home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / text / hints / volume_08 / issue_11 < prev    next >
Text File  |  1995-07-14  |  9KB  |  230 lines

  1. 8.11
  2. LaserDirect double flush Ö I asked for help last month (8.10
  3. p25) with what to do when I get a paper jam on my LaserDirect LBP8.
  4. (This turns out to be one of those everybody-knows-about-it-except-me
  5. problems.) Apparently, all I have to do is click on the LaserDirect icon
  6. on the iconbar while holding <alt> down. This brings up a LaserDirect
  7. Status window telling me the paper is jammed and offering me a way of
  8. escape which I accept gratefully.
  9. 8.11
  10. Many thanks to all those who wrote or phoned to tell me what a
  11. gumby I am. I had been using the ÉFlush printeræ menu option from the
  12. ÉPrinter Queueæ window (adjust-click on the iconbar icon) instead of
  13. LaserDirectæs own flush system Ö you stupid boy!
  14. 8.11
  15. (Mind you, from some of the suggestions people made, like öhit
  16. <f12><return>ò, I suspect that I may not be the only person to have had
  17. this problem and not realised how simple the solution was!)
  18. 8.11
  19. Ed.
  20. 8.11
  21. Printing from Basic programs (e.g. 8.10 pp21/47) Ö Here are a
  22. couple of short points which may help. Firstly, ÉPage printingæ via a
  23. printer driver.
  24. 8.11
  25. The key SYS calls recommended for Éproperæ printing via the
  26. desktop still work in non-Wimp mode, so it is fairly straightforward to
  27. produce hard copy of text output directly from Basic programs Ö albeit
  28. in Égraphic/page printingæ style. 
  29. 8.11
  30. A sequence which certainly works is:- 
  31.  DEF PROCprint
  32.  SYS öPDriver_PageSizeò TO width%, 
  33.  height%,left%,bottom%,
  34.  right%,top%
  35.  pf%=OPENOUT(öprinter:ò)
  36.  SYS öPDriver_SelectJobò,pf%,
  37.  öPrinter Testò
  38.  LOCAL ERROR
  39.  ON ERROR LOCAL:SYS öPDriver_AbortJobò,pf%:CLOSE#pf%
  40.  :
  41.  ENDPROC
  42.  rect%!0=0
  43.  rect%!4=0
  44.  rect%!8=(right%-left%)/400
  45.  rect%!12=(top%-bottom%)/400
  46.  trans%!0=1<<16
  47.  trans%!4=0
  48.  trans%!8=0
  49.  trans%!12=1<<16
  50.  plotat%!0=left%
  51.  plotat%!4=bottom%
  52.  SYS öPDriver_GiveRectangleò,0,rect% 
  53.  ,trans%,plotat%,&FFFFFF00
  54.  SYS öPDriver_DrawPageò,1,block%,0,0 TO more%
  55.  WHILE more%
  56.  ááSYS öColourTrans_SetGCOLò,0
  57.  ááMOVE 0,(top%-bottom%)/400
  58.  áá............
  59.  áá(BASIC print commands Ö see text)
  60.  áá............
  61.  ááSYS öPDriver_GetRectangleò,,block% TO more%
  62.  ENDWHILE
  63.  SYS öPDriver_EndJobò,pf%
  64.  RESTORE ERROR
  65.  CLOSE# pf%
  66.  ENDPROC
  67. 8.11
  68. The above assumes that you have a global error call in
  69. operation, and you will need to add to the ON ERROR LOCAL line to
  70. restore to that call. Also, you need to have declared certain variables
  71. earlier in the program, such as...
  72. 8.11
  73. DIM rect% 16
  74.  DIM trans% 16
  75.  DIM plotat% 8
  76.  DIM block% 16
  77. 8.11
  78. All the normal Basic printing commands seem to work OK, i.e.
  79. PRINT, PRINT TAB(), VDU8, 9, 10 and 11, but be careful of VDU28 and 31
  80. (and, ofácourse, VDU1). 
  81. 8.11
  82. With care, you can therefore merely insert (at Basicæs print
  83. commands above) the call to whatever routine puts your required text
  84. onto the screen. 
  85. 8.11
  86. Secondly, what about using of text files? Although it isnæt
  87. printing directly from Basic, there are some advantages in using text
  88. files, as others have noted Ö not least being that your printer driver
  89. is likely to use Écharacter printingæ, and you can view and edit via
  90. Edit, if you want. 
  91. 8.11
  92. Extending the thoughts offered by others (and assuming you want
  93. to get a hard copy of something youæve put on the screen) then the
  94. following PROCs can be used to put text line by line on the screen in
  95. the way you want it and, at the same time, construct a corresponding
  96. text file for subsequent dragging to your Printer Driver or into !Edit. 
  97. 8.11
  98.  10 MODE27 
  99.  20 file%=OPENOUT(ötextfileò)
  100.  30 CLOSE#file%
  101.  32 *SetType textfile Text
  102.  40 PROCfile_and_centreprint(öText File Testò)
  103.  50 PROCfile_and_blankline
  104.  60 PROCfile_and_printtab(10,öFirst Line at TAB 10ò,TRUE)
  105.  70 PROCfile_and_printtab(10,öSecond Line at TAB 10, but held ò,FALSE)
  106.  80 PROCfile_and_printtab(50,öto await this at TAB 50ò,TRUE)
  107.  90 END
  108.  10000 
  109.  10010 DEF PROCtextfile(textline$, return%)
  110.  10020 REM return% is TRUE/FALSE flag
  111.  10030 REM to tell BPUT# to make 
  112.  <RETURN> action after text or not
  113.  10040 file%=OPENUP(ötextfileò)
  114.  10050 
  115.  10060 REM Put pointer to end of file ready for more text.
  116.  10070 PTR#file%=EXT#file%
  117.  10080 
  118.  10090 IF return% THEN
  119.  10100ááBPUT#file%,textline$
  120.  10110 ELSE
  121.  10120ááBPUT#file%,textline$;
  122.  10130 ENDIF 
  123.  10140 CLOSE#file%
  124.  10150 ENDPROC
  125.  10160 
  126.  10190 DEF PROCfile_and_centreprint
  127.  (string$)
  128.  10200 REM Prints a string centred on screen,
  129.  10210 REM and puts a corresponding string into a text file.
  130.  10220 
  131.  10230 LOCAL tab%,screenwidth%
  132.  10240 REM First find screenwidth in Mode being used,
  133.  10250 SYS öOS_ReadModeVariableò,-1,1 TO ,,screenwidth%
  134.  10260 
  135.  10270 tab%=((screenwidth%+1)-LEN(string$)) DIV 2
  136.  10280 PRINT TAB(tab%)string$:REM To screen
  137.  10290 
  138.  10300 line$=STRING$(tab%,ö ò)+string$
  139.  10310 PROCtextfile(line$,TRUE):REM Corresponding string to text file
  140.  10320 ENDPROC
  141.  10330 
  142.  10360 DEF PROCfile_and_blankline
  143.  10370 REM Prints an empty line on screen,
  144.  10380 REM and puts a corresponding string into a text file.
  145.  10400 PRINT:REM To screen
  146.  10420 line$=öò
  147.  10430 PROCtextfile(line$,TRUE):REM Corresponding string to text file
  148.  10440 ENDPROC
  149.  10450 
  150.  10480 DEF PROCfile_and_printtab(tab%,string$,crlf%)
  151.  10490 REM Prints a string on screen at the designated tab position,
  152.  10500 REM and returns a corresponding string for a text file.
  153.  10510 REM Écrlf%æ is TRUE/FALSE flag to determine if screen printing
  154.  10520 REM** is to end with <Return> or not (i.e. semi-colon or not).
  155.  10530 
  156.  10540 gap%=tab%-POS
  157.  10550 REM Égap%æ needs to be calculated before printing to screen.
  158.  10560 
  159.  10570 IF crlf% THEN
  160.  10580ááPRINT TAB(tab%)string$
  161.  10590 ELSE
  162.  10600ááPRINT TAB(tab%)string$;
  163.  10610 ENDIF
  164.  10620 
  165.  10630 line$=STRING$(gap%,ö ò)+string$
  166.  10640 PROCtextfile(line$,crlf%):REM Corresponding string to text file
  167.  10650 ENDPROC
  168. 8.11
  169. I am still trying to get Écharacter printingæ via a Printer
  170. Driver direct from Basic!
  171. 8.11
  172. (We have one that we have used at NCS for years. Iæll put it on
  173. the monthly disc. Is that what you want? Ed.)
  174. 8.11
  175. Ray Favre, West Drayton
  176. 8.11
  177. Runny letters Ö Some people donæt realise that the ink used by
  178. inkjet printers is water-based and is therefore not waterproof. This
  179. isnæt normally a problem but it can become one when addressing
  180. envelopes! In rainy weather, my postman often delivers letters where the
  181. address is all but illegible, and if the ink had run in this way before
  182. it had reached my local sorting office, I would probably never have
  183. received it.
  184. 8.11
  185. The solution is very simple. Most stationers sell a Éfixeræ for
  186. use with rub down lettering (Letraset etc.). This is actually a very
  187. fine, clear, varnish in aerosol form. Itæs quite expensive, around ú3,
  188. but a can will last many years. Just lightly spray it on the address or
  189. label (it dries in a few seconds) and your letter will arrive safely
  190. even in a monsoon.
  191. 8.11
  192. David Holden, APDL
  193. 8.11
  194. Transferring text files using Hermes Ö There is an increasing
  195. interest these days in exchanging text files between Acorn RISC
  196. computers and PCs. There are two major differences Ö PC text files end
  197. with a ctrl-Z (ASCIIá26) character and have CR LF (ASCII 13 +áASCII 10)
  198. characters at the end of each line. Acorn text files have only an LF
  199. character at the end of a line and have no special end character. Hermes
  200. (v1.22 onwards) is able to handle most of the conversion in either
  201. direction.
  202. 8.11
  203. To convert an Acorn file to PC, open the Hermes application
  204. window and display the Pipe parameters. Change the Line End to CRLF and
  205. click on öOKò. Drag the text file to Edit, use <ctrl-down> to move the
  206. cursor to the end of the file and add ñCTRLZñ, then resave. Ensuring
  207. that no application has the input caret, drag the text file onto the
  208. Hermes iconbar icon. After a few moments, the converted file will be
  209. piped to Edit where it can be saved to the DOS disc.
  210. 8.11
  211. To convert a PC file to Acorn, change the DOS file to Text
  212. (&FFF) and open an Edit document, making sure it has the input focus.
  213. Drag the DOS file onto the Hermes iconbar icon and the converted file
  214. will be sent direct to the edit document with all the CR characters
  215. stripped out. The ctrl-Z character at the end can be deleted manually.
  216. 8.11
  217. Hermes raison dæetre is to facilitate transfer between packages
  218. and this cross-platform interchange is an extension of that philosophy.
  219. 8.11
  220. Mike Logan, Base 5 Technical Graphics
  221. 8.11
  222. Underlining Impressionæs bugs Ö If you are editing a style, and
  223. adding ÉUnderlines 2æ to it in Publisher (4.05), make sure that any
  224. existing text in that style does not have underlines set as an effect.
  225. If the effect is set, strange things happen, andáthe window goes black!
  226. 8.11
  227. Brian Cocksedge, Midhurst, W Sussexáuá
  228. 8.11
  229.  
  230.