home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / database / sch100.zip / READPRN.PRG < prev    next >
Text File  |  1993-02-24  |  4KB  |  136 lines

  1. *****
  2. * Handle special print options
  3. *****
  4. superbox(09,10,13,70,.f.,"",.t.)
  5. setcursor(.f.)
  6. setwrap(.t.)
  7. setmessage(23,"center")
  8. mvprint=0
  9. prompt(10,11,"               Print ALL commands/functions               ","            ALL documentation           ")
  10. prompt(11,11,"                Print one command/function                ","     Print selected command/function    ")
  11. prompt(12,11,"               Print from a command/function              "," ALL docs from selected command/function")
  12. menuto("mvprint")
  13.     if mvprint=1
  14.         mvkey=message("The documentation will print to LPT1: on standard 8.5 x 11 paper.","   ESC to cancel   Any key to continue")
  15.         if mvkey=27
  16.             return
  17.         endif
  18.         message("ESC to cancel {Effective between documents}...","OFF")
  19.         *****
  20.         * Open userhelp and begin loading and printing
  21.         *****
  22.         if .not. is_open("userhelp")
  23.             open("userhelp","userhelp",.t.,"userhelp")
  24.         else
  25.             select("userhelp")
  26.         endif
  27.         jumpto("top")
  28.         setconsole(.f.)
  29.         setoutput("lpt1")
  30.         setprint(.t.)
  31.         setmargin("7")
  32.         mvcount=1        
  33.         setexit(.t.)
  34.         do while .not. userhelp->(eof())
  35.             mvcount=1
  36.             do while mvcount <= mlcount(userhelp->text,65)
  37.                 mvtext=memoline(userhelp->text,65,mvcount)
  38.                 output("mvtext")
  39.                 mvcount=mvcount+1
  40.             enddo
  41.             eject
  42.             if inkey(5)=27
  43.                 message("Printing cancelled...","OFF")
  44.                 cleartype()
  45.                 return
  46.             endif
  47.             skipto(1,"userhelp")
  48.         enddo
  49.         setexit(.f.)
  50.         setprint(.f.)
  51.         setconsole(.t.)
  52.     endif
  53.     if mvprint=2
  54.         *****
  55.         * Open userhelp and begin loading and printing
  56.         *****
  57.         if .not. is_open("userhelp")
  58.             open("userhelp","userhelp",.t.,"userhelp")
  59.         else
  60.             select("userhelp")
  61.         endif
  62.         superbox(12,12,20,60,.f.,"",.t.)
  63.         say(20,22,"ENTER - Select   ESC - Exit")
  64.         dbedit(13,13,19,59)
  65.         if lastkey()=13
  66.             *****
  67.             * Print this record
  68.             *****
  69.             setconsole(.f.)
  70.             setoutput("lpt1")
  71.             setprint(.t.)
  72.             setmargin("7")
  73.             mvcount=1        
  74.             setexit(.t.)
  75.             mvcount=1
  76.             do while mvcount <= mlcount(userhelp->text,65)
  77.                 mvtext=memoline(userhelp->text,65,mvcount)
  78.                 output("mvtext")
  79.                 mvcount=mvcount+1
  80.             enddo
  81.             eject
  82.             setexit(.f.)
  83.             setprint(.f.)
  84.             setconsole(.t.)
  85.         endif
  86.     endif
  87.     if mvprint=3
  88.         *****
  89.         * Open userhelp and begin loading and printing
  90.         *****
  91.         if .not. is_open("userhelp")
  92.             open("userhelp","userhelp",.t.,"userhelp")
  93.         else
  94.             select("userhelp")
  95.         endif
  96.         superbox(12,12,20,60,.f.,"",.t.)
  97.         say(20,22,"ENTER - Select   ESC - Exit")
  98.         dbedit(13,13,19,59)
  99.         if lastkey()=13
  100.             *****
  101.             * Print from this record
  102.             *****
  103.             mvkey=message("The documentation will print to LPT1: on standard 8.5 x 11 paper.","   ESC to cancel   Any key to continue")
  104.             if mvkey=27
  105.                 return
  106.             endif
  107.             message("ESC to cancel {Effective between documents}...","OFF")
  108.             setconsole(.f.)
  109.             setoutput("lpt1")
  110.             setprint(.t.)
  111.             setmargin("7")
  112.             mvcount=1        
  113.             setexit(.t.)
  114.             do while .not. userhelp->(eof())
  115.                 mvcount=1
  116.                 do while mvcount <= mlcount(userhelp->text,65)
  117.                     mvtext=memoline(userhelp->text,65,mvcount)
  118.                     output("mvtext")
  119.                     mvcount=mvcount+1
  120.                 enddo
  121.                 eject
  122.                 if inkey(5)=27
  123.                     message("Printing cancelled...","OFF")
  124.                     cleartype()
  125.                     return
  126.                 endif
  127.                 skipto(1,"userhelp")
  128.             enddo
  129.             eject
  130.             setexit(.f.)
  131.             setprint(.f.)
  132.             setconsole(.t.)
  133.         endif
  134.     endif
  135.     return
  136.