home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Complet / FreeDOS / fdbootcd.iso / FREEDOS / PACKAGES / BASE / DISK06 / GRAPHICX.ZIP / bin / graphics.bat < prev    next >
DOS Batch File  |  2003-07-15  |  6KB  |  222 lines

  1. @echo off
  2. echo Running in MS GRAPHICS compatibility mode...
  3. rem own name is %0
  4. rem %? is errorlevel
  5.  
  6. set GRAPHINV=/I
  7. set GRAPHCMD=NONE
  8. set GRAPHCGA=
  9. set GRAPHLH=LH
  10.  
  11. goto parsestart
  12.  
  13. :parseloop
  14.  
  15. shift
  16.  
  17. :parsestart
  18.  
  19. if _%1==_ goto parsed
  20. rem echo Argument: %1
  21.  
  22. rem /R print black as black and white as white
  23. if _%1==_/R goto asoncrt
  24. if _%1==_/r goto asoncrt
  25.  
  26. rem /I print black as white and white as black (no MS option)
  27. if _%1==_/I goto parseloop
  28. if _%1==_/i goto parseloop
  29.  
  30. rem /LOW do not load high (no MS option)
  31. if _%1==_/LOW goto loadlow
  32. if _%1==_/low goto loadlow
  33.  
  34. rem /B enable processing of CGA background color 0 palette
  35. if _%1==_/B goto usecga
  36. if _%1==_/b goto usecga
  37.  
  38. if _%1==_/LCD goto lcd
  39. if _%1==_/lcd goto lcd
  40.  
  41. if _%1==_/PRINTBOX:LCD goto lcd
  42. if _%1==_/printbox:lcd goto lcd
  43.  
  44. rem std is the default anyway
  45. if _%1==_/PRINTBOX:STD goto parseloop
  46. if _%1==_/printbox:std goto parseloop
  47.  
  48. rem IBM PC color (ribbon) printer not supported:
  49. if _%1==_COLOR1 goto unsupp
  50. if _%1==_color1 goto unsupp
  51. rem same, RGB
  52. if _%1==_COLOR4 goto unsupp
  53. if _%1==_color4 goto unsupp
  54. rem same, CMYK
  55. if _%1==_COLOR8 goto unsupp
  56. if _%1==_color8 goto unsupp
  57.  
  58. rem IBM graphics printer / proprinter / quietwriter
  59. if _%1==_GRAPHICS goto unsupp
  60. if _%1==_graphics goto unsupp
  61. rem same, but 11 inch wide
  62. if _%1==_GRAPHICSWIDE goto unsupp
  63. if _%1==_graphicswide goto unsupp
  64.  
  65. rem PostScript compatibles (hope this is correct)
  66. if _%1==_LASERJET goto postscr
  67. if _%1==_laserjet goto postscr
  68. if _%1==_LASERJETII goto postscr
  69. if _%1==_laserjetii goto postscr
  70.  
  71. rem HP PCL compatibles (hope this is correct)
  72. if _%1==_HPDEFAULT goto hppcl
  73. if _%1==_hpdefault goto hppcl
  74. if _%1==_DESKJET goto hppcl
  75. if _%1==_deskjet goto hppcl
  76.  
  77. rem HP RuggedWriter, HP Thinkjet and HP QuietJet are HP PCL
  78. if _%1==_RUGGEDWRITER goto hppcl
  79. if _%1==_ruggedwriter goto hppcl
  80. if _%1==_RUGGEDWRITERWIDE goto hppcl
  81. if _%1==_ruggedwriterwide goto hppcl
  82. if _%1==_THINKJET goto hppcl
  83. if _%1==_thinkjet goto hppcl
  84. if _%1==_QUIETJET goto hppcl
  85. if _%1==_quietjet goto hppcl
  86. if _%1==_QUIETJETPLU goto hppcl
  87. if _%1==_quietjetplu goto hppcl
  88.  
  89. rem IBM PC convertible (portable) thermal printer
  90. if _%1==_THERMAL goto unsupp
  91. if _%1==_thermal goto unsupp
  92.  
  93. rem Special printer types for FreeDOS graphics:
  94.  
  95. rem HP PCL
  96. if _%1==_HPPCL goto hppcl
  97. if _%1==_hppcl goto hppcl
  98. if _%1==_PCL goto hppcl
  99. if _%1==_pcl goto hppcl
  100.  
  101. rem PostScript
  102. if _%1==_POSTSCRIPT goto postscr
  103. if _%1==_postscript goto postscr
  104. if _%1==_PS goto postscr
  105. if _%1==_ps goto postscr
  106.  
  107. rem ESC/P
  108. if _%1==_EPSON goto epson
  109. if _%1==_epson goto epson
  110. if _%1==_ESC/P goto epson
  111. if _%1==_esc/p goto epson
  112. if _%1==_ESC/P2 goto epson
  113. if _%1==_esc/p2 goto epson
  114. if _%1==_ESCP goto epson
  115. if _%1==_escp goto epson
  116. if _%1==_ESCP2 goto epson
  117. if _%1==_escp2 goto epson
  118.  
  119. if _%1==_/? goto help
  120. if _%1==_/HELP goto help
  121. if _%1==_/help goto help
  122.  
  123. echo Unsupported option: %1
  124. echo Hint: Loading printer definition files is not supported yet.
  125. goto help
  126.  
  127. rem END of the main loop
  128.  
  129. :loadlow
  130. echo Will not use LH (LOADHIGH).
  131. set GRAPHLH=
  132. goto parseloop
  133.  
  134. :unsupp
  135. echo Printer type %1 not yet supported by this program.
  136. echo   If you really have such a printer, please mail me (see help text).
  137. goto help
  138.  
  139. :help
  140. echo Usage: GRAPHICS type options
  141. echo Supported printer types:
  142. echo   HPPCL (PCL),   EPSON (ESC/P),   POSTSCRIPT (PS)
  143. echo POSTSCRIPT compatible: LASERJET[II], QUIETJET[PLU]
  144. echo HP PCL compatible:     HPDEFAULT, DESKJET, RUGGEDWRITER[WIDE], THINKJET
  145. echo EPSON compatible:      many impact / ribbon printers work with "EPSON".
  146. echo Unsupported types:     IBM PC color ribbon printer (color1, color4, color8)
  147. echo                        IBM convertible thermal printer (thermal)
  148. echo                        IBM graphics printer (graphics[wide])
  149. echo                            (also for IBM proprinter and IBM quietwriter)
  150. echo Options:
  151. echo   /B use CGA background color
  152. echo   /R print black as black and white as white
  153. echo   /LCD or /PRINTBOX:LCD and /PRINTBOX:STD are ignored
  154. echo   (try using /LCD to get an explanation displayed).
  155. echo Mail me if you have any questions or need some new feature or driver:
  156. echo   "eric coli.uni-sb.de" (put an "@" where the " " is).
  157. goto done
  158.  
  159. :hppcl
  160. echo Using HPPCL type for type %1
  161. echo   If you think this is not correct, mail me (see help text).
  162. set GRAPHCMD=GRAPH-HP
  163. goto parseloop
  164.  
  165. :epson
  166. echo Using ESC/P (Epson) type for type %1
  167. echo   If you think this is not correct, mail me (see help text).
  168. set GRAPHCMD=GRAPHPIN
  169. goto parseloop
  170.  
  171. :postscr
  172. echo Using PostScript type for type %1
  173. echo   If you think this is not correct, mail me (see help text).
  174. set GRAPHCMD=GRAPH-PS
  175. goto parseloop
  176.  
  177. :lcd
  178. echo This GRAPHICS always assumes a screen width:height ratio of 4:3.
  179. echo   If your screen really has another size, mail me (see help text).
  180. goto parseloop
  181.  
  182. :asoncrt
  183. echo Printing black as black and white as white, which is the
  184. echo   default for this GRAPHICS (different from MS GRAPHICS!).
  185. set GRAPHINV=
  186. goto parseloop
  187.  
  188. :usecga
  189. echo Using CGA color 0 palette setting (rather than assuming black).
  190. set GRAPHCGA=/B
  191. goto parseloop
  192.  
  193. :parsed
  194. if _%GRAPHINV%==_/I echo Printing black as white and white as black
  195. if _%GRAPHINV%==_/I echo which internally uses /I of this GRPAHICS.
  196.  
  197. if _%GRAPHCMD%==_NONE echo You have to specify a printer type.
  198. if _%GRAPHCMD%==_NONE goto help
  199.  
  200. echo You can use the following command directly instead of
  201. echo GRAPHICS [your options] in the future:
  202. echo %GRAPHLH% %GRAPHCMD% %GRAPHINV% %GRAPHCGA%
  203. echo Note that %GRAPHCMD% allows extra options:
  204. echo   /E economy mode, /1 use LPT1, /2 use LPT2, /3 use LPT3,
  205.  
  206. if _%GRAPHCMD%==_GRAPH-PS goto nodither
  207. echo   /R for random instead of ordered dither
  208. :nodither
  209.  
  210. if _%GRAPHCMD%==_GRAPHPIN echo   /C for 8pin mode instead of 24pin mode
  211. if _%GRAPHCMD%==_GRAPH-PS echo   /C for more HP compatibility
  212. if _%GRAPHCMD%==_GRAPH-HP echo   /C for 300dpi instead of 600dpi
  213.  
  214. %GRAPHLH% %GRAPHCMD% %GRAPHINV% %GRAPHCGA%
  215.  
  216. :done
  217. set GRAPHINV=
  218. set GRAPHCGA=
  219. set GRAPHCMD=
  220. set GRAHPLH=
  221.  
  222.