home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progbas / ascsu205.arj / PRINT.ASI < prev    next >
Text File  |  1991-12-19  |  1KB  |  91 lines

  1. start:
  2.  
  3. a$=command$
  4. file$=mid$(a$,2,79)
  5. c$=chr$(12)
  6. open "i",1,file$
  7.  
  8. if error=2 then
  9. print ""
  10. print ""
  11. print "File not found."
  12. print
  13. print
  14. goto quiterly:
  15. endif
  16.  
  17. if error=3 then
  18. print ""
  19. print ""
  20. print "Path not found."
  21. print
  22. print
  23. goto quiterly:
  24. endif
  25.  
  26. heading:
  27. cls
  28. print "Printing....";
  29. realfile$=ucase$(file$)
  30. color 0,7
  31. print realfile$
  32. color 7,0
  33. print
  34. print
  35. print "Press Space Bar to pause printing, or Esc to quit."
  36. print
  37. print
  38.  
  39. printmor:
  40. input# 1, line$ crlf
  41.  
  42. if error=96 then
  43. lprint line$
  44. gosub blanklin:
  45. endif
  46.  
  47. lprint line$
  48.  
  49. b$=chr$(27)
  50. d$=chr$(32)
  51.  
  52. a$=inkey$
  53.  
  54. if a$=b$ then
  55. print "Printing has been terminated.  The printer may still have data in its"
  56. print "buffer.  If so, it will continue printing until this is gone."
  57. print
  58. lprint c$
  59. close 1
  60. end
  61. endif
  62.  
  63. if a$=d$ then wait: else dontwait:
  64.  
  65. wait:
  66. print "Press any key to continue. ";
  67. wait2:
  68. a$=inkey$
  69. if a$="" then wait2:
  70. a$=""
  71. goto heading:
  72.  
  73. dontwait:
  74. if error=99 then eof:
  75. goto printmor:
  76.  
  77. blanklin:
  78. input# 1, line$ crlf
  79. if line$="" then printmor:
  80. return
  81.  
  82. eof:
  83. lprint line$
  84.  
  85. finish:
  86. print "Finished."
  87. quiterly:
  88. close 1
  89. lprint c$
  90. end
  91.