home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Corel Draw 6
/
corel-draw-6-cd1.iso
/
draw
/
printd.csc
< prev
next >
Wrap
Text File
|
1995-08-18
|
5KB
|
188 lines
REM Draw Mass Print Utility v1.0
REM Printd.csc July 19, 1995
REM This file will open, print and close all of the specified files in a directory.
DECLARE SUB PrintImage(filename$)
' Following are all filter types with descriptions, filenames, and extensions
DIM FilterName(45) AS STRING
DIM FilterExt(45) AS STRING
DIM FilterType(45) AS LONG
FilterName(1) = "PostScript Interpreted (PS)"
FilterExt(1) = "PS"
FilterType(1) = 1290
FilterName(2) = "GEM File (GEM)"
FilterExt(2) = "GEM"
FilterType(2) = 1284
FilterName(3) = "Corel Presentation Exchange (CMX)"
FilterExt(3) = "CMX"
FilterName(4) = "Computer Graphics Metafile (CGM)"
FilterExt(4) = "CGM"
FilterType(4) = 1280
FilterName(5) = "AutoCad (DXF)"
FilterExt(5) = "DXF"
FilterType(5) = 1296
FilterName(6) = "OS/2 PM Metafile (MET)"
FilterExt(6) = "MET"
FilterType(6) = 1291
FilterName(7) = "Macintosh Pict (PCT)"
FilterExt(7) = "PCT"
FilterType(7) = 1288
FilterName(8) = "IBM PIF (PIF)"
FilterExt(8) = "PIF"
FilterType(8) = 1285
FilterName(9) = "WordPerfect Graphics (WPG)"
FilterExt(9) = "WPG"
FilterType(9) = 1287
FilterName(10) = "Corel Metafile (CMF)"
FilterExt(10) = "CMF"
FilterType(10) = 1295
FilterName(11) = "Windows Metafile (WMF)"
FilterExt(11) = "WMF"
FilterType(11) = 1294
FilterName(12) = "Encapsulated PostScript (EPS)"
FilterExt(12) = "EPS"
FilterType(12) = 1289
FilterName(13) = "Lotus Freelance (PRE)"
FilterExt(13) = "PRE"
FilterType(13) = 1549
FilterName(14) = "HPGL Plotter File (PLT)"
FilterExt(14) = "PLT"
FilterType(14) = 1281
FilterName(15) = "Adobe Illustrator (AI)"
FilterExt(15) = "AI"
FilterType(15) = 1283
FilterName(16) = "Corel Draw! (CDR)"
FilterExt(16) = "CDR"
FilterType(16) = 1795
FilterName(17) = "JPEG Bitmaps (JPG)"
FilterExt(17) = "JPG"
FilterType(17) = 774
FilterName(18) = "Windows Bitmap (BMP)"
FilterExt(18) = "BMP"
FilterType(18) = 769
FilterName(19) = "Paintbrush (PCX)"
FilterExt(19) = "PCX"
FilterType(19) = 770
FilterName(20) = "Targa Bitmap (TGA)"
FilterExt(20) = "TGA"
FilterType(20) = 771
FilterName(21) = "Scitex CT Bitmap (SCT)"
FilterExt(21) = "SCT"
FilterType(21) = 776
FilterName(22) = "CompuServe Bitmap (GIF)"
FilterExt(22) = "GIF"
FilterType(22) = 773
FilterName(23) = "TIFF Bitmap (TIF)"
FilterExt(23) = "TIF"
FilterType(23) = 772
FilterName(24) = "Corel PhotoPaint Image (CTP)"
FilterExt(24) = "CPT"
FilterType(24) = 1792
FilterName(25) = "Windows 3.x/NT Icon Resource (ICO)"
FilterExt(25) = "ICO"
FilterType(25) = 785
FilterName(26) = "Windows 3.x/NT Cursor Resource (CUR)"
FilterExt(26) = "CUR"
FilterType(26) = 784
FilterName(27) = "Windows 3.x/NT Bitmap Resource (EXE)"
FilterExt(27) = "EXE"
FilterType(27) = 786
FilterName(28) = "GEM Paint File (IMG)"
FilterExt(28) = "IMG"
FilterType(28) = 787
FilterName(29) = "Kodak Photo CD Image (PCD)"
FilterExt(29) = "PCD"
FilterType(29) = 775
FilterName(30) = "Picture Publisher 4 (PB4)"
FilterExt(30) = "PB4"
FilterType(30) = 789
FilterName(31) = "Adobe Photoshop (PSD)"
FilterExt(31) = "PSD"
FilterType(31) = 788
FilterName(32) = "MACPaint Bitmap (MAC)"
FilterExt(32) = "MAC"
FilterType(32) = 790
FilterName(33) = "Wavelet Compressed Bitmap (WVL)"
FilterExt(33) = "WVL"
FilterType(33) = 777
FilterName(34) = "CALS Compressed Bitmap (CAL)"
FilterExt(34) = "CAL"
FilterType(34) = 800
FilterName(35) = "CorelCHART (CCH)"
FilterExt(35) = "CCH"
FilterType(35) = 1541
FilterName(36) = "CorelMOVE (CMV)"
FilterExt(36) = "CMV"
FilterType(36) = 1539
FilterName(37) = "CorelSHOW (SHW)"
FilterExt(37) = "SHW"
FilterType(37) = 1540
FilterName(38) = "MicroSoft PowerPoint (PPT)"
FilterExt(38) = "PPT"
FilterType(38) = 1548
FilterName(39) = "Video for Windows (AVI)"
FilterExt(39) = "AVI"
FilterType(39) = 1536
FilterName(40) = "AutoDesk FLIC (FLI)"
FilterExt(40) = "FLI"
FilterType(40) = 1543
FilterName(41) = "MPEG Animation (MPG)"
FilterExt(41) = "MPG"
FilterType(41) = 1551
FilterName(42) = "OS/2 Bitmap (BMP)"
FilterExt(42) = "BMP"
FilterType(42) = 792
FilterName(43) = "Corel TRACE (AI)"
FilterExt(43) = "AI"
FilterType(43) = 1301
FilterName(44) = "All Files (*.*)"
FilterExt(44) = "*"
FilterType(44) = -1
BEGIN DIALOG AutoPrint 223, 62, "AutoPrint!"
TEXT 8, 8, 73, 8, "Path to images to print:"
TEXTBOX 87, 4, 128, 13, PrintPath$
TEXT 8, 22, 74, 8, "Type of images to print:"
DDLISTBOX 88, 20, 128, 111, FilterName$, FilterTypeIndex%
PUSHBUTTON 115, 43, 46, 14, "&Print"
CANCELBUTTON 170, 43, 46, 14
END DIALOG
PrintPath$ = CURRFOLDER
FilterTypeIndex = 44
' show the dialog
retval% = DIALOG(AutoPrint)
' check for cancel
IF retval = 2 THEN STOP
' check for trailing backslash
IF RIGHT(PrintPath$, 1) = "\" THEN PrintPath$ = LEFT(PrintPath$, LEN(PrintPath$) - 1)
' retrieve the extensions
PrintExt$ = FilterExt(FilterTypeIndex)
PrintSearch$ = "*." + PrintExt
SearchCriteria$ = PrintPath$ + "\" + "*." + PrintExt$
PrintFile$ = FINDFIRSTFOLDER(SearchCriteria, 1 OR 2 OR 4 OR 8 OR 16 OR 32)
DO WHILE PrintFile$ <> ""
PrintImage PrintPath$ + "\" + PrintFile$
PrintFile$ = FINDNEXTFOLDER()
LOOP
'--------------------------------------------------------------------------
SUB PrintImage(Filename$)
WITHOBJECT DRAW
.FileNew
.FileImport FileName$
.FilePrint
.FileClose
END WITHOBJECT
END SUB