home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / uedit-stuff_429.lzh / Uedit-Stuff / Printing < prev    next >
Text File  |  1991-01-10  |  5KB  |  112 lines

  1.  
  2. These here are modified printing commands that I use.  Others might want
  3. something similar.  The four choices in alt-p are those that were most useful
  4. to me.  My printer is set up to use letter quality by default; the indent
  5. option is for letters, with lineLenth = 60.  Others may want options for
  6. elite pitch, eight lines per inch, or such like.  If you want to print
  7. without any of those special features, just press any other key.
  8.  
  9. Since alt-p used to be "select printer port", that's moved to shftAlt-p here.
  10.  
  11. CAUTION: USING "CMD" TO REDIRECT THIS THING'S OUTPUT MAY RESULT IN VOMITING,
  12. CONVULSIONS, UNCONCIOUSNESS, HALLUCINATIONS, OR VOTING REPUBLICAN!  Don't say
  13. you haven't been warned.  (It looks rather like the CMD process and Uedit are
  14. getting into a deadly embrace.)
  15.  
  16. Print buffer, asking whether draft, etc; add final formfeed
  17. <alt-p: putMsg("F1 = draft, F5 = justified proportional, F10 = 1\" indent") .."
  18.         freeBuf(buf54)
  19. .. the printerCode sequences don't work if this is the first print job
  20. .. done immediately after the printer.device is loaded, cause it somehow gets
  21. .. all tangled up in the initialization sequence the driver sends.  At least
  22. .. with my printer it does.  So we need some padding:
  23.         do (n54,1,69) insertChar(buf54, 0)
  24.         getKey(n54)
  25.         if (eqNum(n54, 80))
  26.             printerCode(buf54, 26, 0, 0)    .. draft mode
  27.         else if (eqNum(n54, 84)) {
  28.             printerCode(buf54, 65, 11, 70)      .. centered sixty char line
  29.             printerCode(buf54, 45, 0, 0)    .. proportional spacing
  30.             printerCode(buf54, 51, 0, 0)    .. full justify on
  31.         } else if (eqNum(n54, 89))
  32.             printerCode(buf54, 65, 11, 223)    .. ten space left margin
  33.         runKey(virtual-k)
  34.         print(curFile, all)
  35.         if (eqNum(n54, 80))
  36.             printerCode(buf54, 25, 0, 0)
  37.         else if (eqNum(n54, 84))
  38.             printerCode(buf54, 1, 0, 0)
  39.         else if (eqNum(n54, 89))
  40.             printerCode(buf54, 65, 0, 223)
  41.         equateLoc(curFile, mouseLoc, atCursor)
  42.         equateLoc(curFile, atCursor, eFile)
  43.         moveCursor(curFile, sChar)
  44.         if (not is(curFile, formFeed))
  45.             insertChar(buf54, 12)
  46.         runKey(virtual-k)
  47.         equateLoc(curFile, atCursor, mouseLoc)
  48. >
  49. I think I could use something like that for just the hilite region.
  50. ** needs to remember the sPage location.
  51.  
  52. Select printing port:  parallel, serial, Preferences raw or processed.
  53. <shftAlt-p:     putMsg("Printer select: 0=PAR: 1=SER: 2=PRT: 3=PRT:RAW")
  54.                 getKeyVal(macroNum,inputChar)
  55.                     sub(n54,inputChar,"0")
  56.                 if (geNum(n54,0))  if (gtNum(4,n54)) equateNum(prefPrint,n54)
  57.                 putMsg(" ") >
  58.  
  59. Print entire document without initialization or added formfeed at end
  60. <altCtl-p: print(curFile,all)>
  61.  
  62. Print a printerCode sequence in buf54 and then free it
  63. <virtual-k:     equateNum(n52, prefPrint)
  64.                 equateNum(prefPrint, 2)
  65.                 print(buf54, all)
  66.                 equateNum(prefPrint, n52)
  67.                 freeBuf(buf54) >
  68.  
  69. Initialize the printer to the default state
  70. <rAmiga-p:      freeBuf(buf54)
  71.                 printerCode(buf54, 1, 0, 0)
  72.                 runKey(virtual-k) >
  73.  
  74.  
  75. Give printer control code help
  76. <shftAltCtl-p:  freeBuf(buf54)
  77.              insertRgn(buf54,sFile,
  78. "Press lAmiga-p and then one of the letters below.  For boldface, italics,
  79. 8 lines/inch, etc, the hilite region is bracketed with printer codes:
  80.  
  81. i = italics             e = elite               n = NLQ
  82. u = underline           l = enlarged            x = superscript
  83. b = boldface            s = shadow              y = subscript
  84. c = condensed           d = double strike       8 = 8 lines/inch
  85.  
  86.        rAmiga-g = find next printer code in document
  87.        lAmiga-g = input a printer code # (0-75.  See table in Manual.)
  88.  
  89. \"Print select\" must be 2 or 3 for these codes to control your printer.
  90. Select \"Show vals\" to see what print-select is.  Select your printer in
  91. Preferences.  Here are some other printer codes:
  92.  
  93. 0 = reset (sets TOF)               45 = proportional spacing
  94. 1 = initialize to default state    46 = fixed width spacing
  95. 15 = elite spacing                 48 = set proportional offset
  96. 17 = condensed spacing             51 = auto justify margins
  97. 25 = letter quality                52 = turn off auto justify
  98. 26 = draft mode                    65 = set margins
  99.  
  100. ",all)
  101.         flipFlag(buf54,readOnly)
  102.         equateNum(n53,curFile)
  103.         editBuf(buf54)
  104.         vScroll(sFile)
  105.         putMsg(" press any key ")
  106.         updateDisplay
  107.         getKey(n54)
  108.         editBuf(buf[n53])
  109.         freeBuf(buf54)
  110.         putmsg(" ")   >
  111.  
  112.