home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / hqfax12.zip / EP2GRAFX.BAT < prev    next >
DOS Batch File  |  1993-10-29  |  7KB  |  156 lines

  1. REM *********************************************************************/
  2. REM                                                                     */
  3. REM   SYSTEM       : HQ-FAX, Uitilities                                 */
  4. REM   COPYRIGHT    : (c) 1993 HTF CONSULTING                            */
  5. REM                                                                     */
  6. REM *********************************************************************/
  7. REM                                                                     */
  8. REM   BAT file name: EP2GRAFX.bat                                       */
  9. REM   DESCRIPTION  : This is the work-horse batch file which drives the */
  10. REM                  conversion and view or send process for the Grp 3  */
  11. REM                  FAX formats                                        */
  12. REM *********************************************************************/
  13. REM
  14. Rem - Documentname Fontname (Options )
  15. Echo off
  16. CLS
  17. Echo *************************************************************************
  18. Echo *****                     HTF CONSULTING                            *****
  19. Echo ***            EPSON to Graphics Conversion Procedure                 ***
  20. Echo **               Copyright (c) 1993  HTF Consulting                    **
  21. Echo *                                                                       *
  22. if %1 == /FAX Echo * Convert EPSON file: '%2.ECL' to PCX in font '%3'
  23. if %1 == /FAXVU Echo * Convert EPSON file: '%2.ECL' to PCX in font '%3'
  24. if %1 == /PCX Echo * Convert EPSON file: '%2.ECL' to PCX in font '%3'
  25. if %1 == /P&F Echo * Convert EPSON file: '%2.ECL' to PCX/FAX in font '%3'
  26. if %1 == /P&F Echo * & Convert PCX file(s): '%2.P*' to Fax file(s) %2.F*
  27. Echo *                                                                       *
  28. if not "%4" == "" Echo * Special options chosen are: %4 %5 %6 %7 %8 %9
  29. if "%4" == "" Echo * No Special options chosen:
  30. Echo *                                                                       *
  31. Echo * Available special options are:                                        *
  32. Echo *  /CDB     Convert Double-Print to BOLD                                *
  33. Echo *  /CDR     Convert Double-Print to REVERSE-VIDEO                       *
  34. if %1 == /PCX Echo *  /COLRbf  Assign (b)ACKGROUND & (f)OREGROUND colors in HEXADECIMAL    *
  35. if %1 == /P&F Echo *  /COLRbf  Assign (b)ACKGROUND & (f)OREGROUND colors in HEXADECIMAL    *
  36. Echo *  /CONT    Make 1 contiguous FAX/PCX file (else 1 per page)            *
  37. if %1 == /FAX Echo *  /FHx     Specify a Fax header format: x = {B, F, N, Q, R, U}
  38. if %1 == /P&F Echo *  /FHx     Specify a Fax header format: x = {T, F, N, Q, R, U}         *
  39. Echo *  /SEND    Specify Send parameters; Ex: /SEND 999-8888 /TM09:00p       *
  40. Echo *           (Send parameters must be last parameters on command line)   *
  41. Echo *  /FORM    Specify a Pre-printed form as a background of every page    *
  42. Echo *  /LMddd   Specify an EXTRA left margin in 100's per inch              *
  43. Echo *  /LOGO    Apply the image 'LOGO.PCX' to the top center of every page  *
  44. Echo *  /PFxx    Override the default page format (NA) : xx = {A3, A4, B4, NA}
  45. Echo *  /PPxx.yy Specify start(xx), end(yy) page numbers (xx,yy) = 01 - 99   *
  46. REM Echo *  /RMddd   Specify a right margin in 100's per inch: will Right Justify*
  47. Echo *  /RVx     Specify Reverse-Video trigger character: x = {*, ~, \, ^ }  *
  48. Echo **                                                                     **
  49. Pause
  50. if not exist %2.ECL goto Abend
  51. if not exist %3.FNT goto Abend
  52.  
  53. if %1 == /FAX if exist %2.F0* erase %2.F0*
  54. if %1 == /PCX if exist %2.P0* erase %2.P0*
  55. if %1 == /PAF if exist %2.P0* erase %2.P0*
  56. if %1 == /PAF if exist %2.F0* erase %2.F0*
  57.  
  58. Rem    When we get here we're converting the efficient way using DOS Piping
  59. CLS
  60. Echo **************************************************************************
  61. Echo ***  Converting EPSON file %2.ECL to graphics images
  62. Echo ***  Approximate time required will be 1 minutes per full page          **
  63. Echo ***  ( When run on a 16 Mhz AT 386/SX )                                 **
  64. Echo ***                                                                     **
  65. Echo ***  Approximate disk space required will be:                           **
  66. Echo ***      .05 Megabytes (50K) per page                                  **
  67. Echo ***  In addition DOS will need space for a temp file of approximately   **
  68. Echo ***      .55 Megabytes (500K) per  page                                 **
  69. Echo ***                                                                     **
  70. Echo **************************************************************************
  71. Echo Working .....
  72.  
  73. if not %1 == /FAX if not %1 == FAXVU goto PCXprep
  74.  
  75. ECL2pxls.exe %2 %3 EP2grafx EP2grafx %4 %5 %6 %7 %8 %9
  76. if errorlevel 2 goto Abend
  77.  
  78. Pxls2fax.exe EP2grafx Ep2grafx %2
  79. if errorlevel 2 goto Abend
  80.  
  81. goto Display
  82.  
  83. :PCXprep
  84. if %1 == /P&F goto P&F
  85.  
  86. ECL2pxls.exe %2 %3 Ep2grafx stdout %4 %5 %6 %7 %8 %9 | Pxls2pcx.exe EP2grafx stdin %2
  87. if errorlevel 2 goto Abend
  88. if exist %2.P01 if not exist %2.P02 rename %2.P01 %2.PCX
  89. goto Display
  90.  
  91. :P&F
  92. ECL2pxls.exe %2 %3 EP2grafx stdout %4 %5 %6 %7 %8 %9 | Pxls2pcx.exe EP2grafx stdin %2
  93. if errorlevel 2 goto Abend
  94.  
  95. Echo - Ready to Edit PCX file(s) %2.p* and convert to FAX files %2.F*
  96. Pause
  97. Call PCX2FAX3.BAT %2 %4 %5 %6 %7 %8 %9
  98.  
  99. :Display
  100. if %1 == /FAXVU Call viewfax3.bat %2 %4 %5 %6 %7 %8 %9
  101. if %1 == /PCX Call viewpcx.bat  %2 /h %4 %5 %6 %7 %8 %9
  102.  
  103. :Dial
  104. REM - Call the Sendfax.bat file to issue a DOS command line send
  105. if "%9" == "" goto Lk_eight
  106. if  %8 == /SEND Call Sendfax.bat %2 %9
  107.  
  108. :Lk_eight
  109. if "%8" == "" goto Lk_seven
  110. if  %7 == /SEND Call Sendfax.bat %2 %8 %9
  111. goto quit
  112.  
  113. :Lk_seven
  114. if "%7" == "" goto Lk_six
  115. if  %6 == /SEND Call Sendfax.bat %2 %7 %8 %9
  116. goto quit
  117.  
  118. :Lk_six
  119. if "%6" == "" goto Lk_five
  120. if  %5 == /SEND Call Sendfax.bat %2 %6 %7 %8 %9
  121. goto quit
  122.  
  123. :Lk_five
  124. if "%5" == "" goto Lk_quit
  125. if  %4 == /SEND Call Sendfax.bat %2 %5 %6 %7 %8
  126.  
  127. Rem - C'est fini
  128. Echo ***
  129. Echo ***  Successful end of job
  130. Echo ***
  131. goto quit
  132.  
  133. :Abend
  134. if not errorlevel 2 CLS
  135. Type Bell.txt
  136. Echo **************************************************************************
  137. Echo ***                                                                      *
  138. Echo ***  ep2grafx.bat: Abnormal end of job:                                  *
  139. Echo ***  Source document %2.ECL,  Font table %3.FNT
  140. Echo ***                                                                      *
  141. Echo **************************************************************************
  142. Echo *
  143. if not exist %2.ECL Echo ***    EPSON file %2.ECL not found
  144. if exist %3.FNT goto quit
  145. Echo ***    %3.FNT - File not found
  146. Echo ***
  147. Echo ***  Chosen font not available - Available Fonts are listed below:
  148. dir *.fnt /w
  149. Echo ***
  150. Echo ***  The 'A' suffixes are for Alternate Fonts (Elite pitch)
  151. Pause
  152.  
  153. :quit
  154. Echo on
  155. Rem - chdir c:\
  156.