home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / LASER / FONTLD.ZIP / PRINTDOC.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-07-02  |  2.9 KB  |  84 lines

  1. echo off
  2. cls
  3. echo  
  4. echo                              F O N T L O A D E R
  5. echo  
  6. echo An HP LaserJet or compatible that supports soft fonts is required to print
  7. echo the documentation.  Thirteen fonts are sent to your LaserJet before printing.
  8. echo They have ID numbers from 0 to 12.  Don't change these ID numbers as some
  9. echo fonts are called by their ID's.
  10. echo  
  11. echo 315K bytes of fonts are sent to your printer.  If you have a 512K LaserJet,
  12. echo make sure that you don't have any other soft fonts loaded or you may have
  13. echo trouble running this demo.  
  14. echo  
  15. if not /%1 == / goto parm
  16. echo Using PRN!  If your LaserJet is on another device, exit by
  17. echo pressing control break and then pass the name as the 1st parameter.
  18. echo Like this:  "PRINTDOC.BAT LPT2".  
  19. echo  
  20. :parm
  21. echo Press any to key to begin loading fonts.  Press control break to exit.
  22. echo  
  23. pause
  24. cls
  25. echo  
  26. if /%1 == / goto default
  27. if not exist %1 goto no_outfile
  28. :default
  29. if not exist %2FONTLODR.EXE goto no_exe
  30. if not exist %3HV240RPN.USP goto no_font
  31. if not exist %4FONTLODR.DOC goto no_doc
  32. if not exist %4FL.RSP goto no_rsp
  33. rem Notice how it is necessary to specify two "%" characters in a batch file!
  34. rem Example BATch file line:  %2FontLodr.exe %3hv240rpn.usp -l-sh:67%%-t %1 1
  35. %2FontLodr.exe %5@FL.RSP %3hv240rpn.usp -t %1 0
  36. if errorlevel 1 goto error
  37. echo Will now print documentation.  Control break to exit.
  38. pause
  39. if /%1 == / copy %4fontlodr.doc prn
  40. if not /%1 == / copy %4fontlodr.doc %1
  41. goto exit
  42. :error
  43. echo  
  44. echo An error has been returned from FontLoader.  Aborting batch file!
  45. goto exit
  46. :no_outfile
  47. echo Error: %1 does not exist.  Pass the name of a valid device like "LPT2".
  48. if not exist %2FONTLODR.EXE goto no_exe
  49. if not exist %3HV240RPN.USP goto no_font
  50. if not exist %4FONTLODR.DOC goto no_doc
  51. if not exist %5FL.RSP goto no_rsp
  52. goto help
  53. :no_exe
  54. echo Error: Pass the path where FONTLODR.EXE is located as the 2nd parameter.
  55. if not exist %3HV240RPN.USP goto no_font
  56. if not exist %4FONTLODR.DOC goto no_doc
  57. if not exist %5FL.RSP goto no_rsp
  58. goto help
  59. :no_font
  60. echo Error: Pass the path where HV240RPN.USP is located as the 3rd parameter.
  61. if not exist %4FONTLODR.DOC goto no_doc
  62. if not exist %5FL.RSP goto no_rsp
  63. goto help
  64. :no_doc
  65. echo Error: Pass the path where FONTLODR.DOC is located as the 4th parameter.
  66. if not exist %5FL.RSP goto no_rsp
  67. goto help
  68. :no_rsp
  69. echo Error: Pass the path where FL.RSP       is located as the 5th parameter.
  70. :help
  71. echo  
  72. echo Format: PRINTDOC device path path path path
  73. echo  
  74. echo Where   Device is PRN, LPT1, LPT2, etc.
  75. echo         First  path is for FONTLODR.EXE.
  76. echo         Second path is for HV240RPN.USP.
  77. echo         Third  path is for FONTLODR.DOC.
  78. echo         Fourth path is for FL.RSP.
  79. echo  
  80. echo Example:  PRINTDOC PRN \UTIL\ ..\TMPPATH\ .\ D:\FONTS\
  81. echo Notice:   Every path name ends with a backslash\.
  82.  
  83. :exit
  84.