home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1996
/
ARCHIVE_96.iso
/
text
/
hints
/
volume_08
/
issue_11
< prev
next >
Wrap
Text File
|
1995-07-14
|
9KB
|
230 lines
8.11
LaserDirect double flush Ö I asked for help last month (8.10
p25) with what to do when I get a paper jam on my LaserDirect LBP8.
(This turns out to be one of those everybody-knows-about-it-except-me
problems.) Apparently, all I have to do is click on the LaserDirect icon
on the iconbar while holding <alt> down. This brings up a LaserDirect
Status window telling me the paper is jammed and offering me a way of
escape which I accept gratefully.
8.11
Many thanks to all those who wrote or phoned to tell me what a
gumby I am. I had been using the ÉFlush printeræ menu option from the
ÉPrinter Queueæ window (adjust-click on the iconbar icon) instead of
LaserDirectæs own flush system Ö you stupid boy!
8.11
(Mind you, from some of the suggestions people made, like öhit
<f12><return>ò, I suspect that I may not be the only person to have had
this problem and not realised how simple the solution was!)
8.11
Ed.
8.11
Printing from Basic programs (e.g. 8.10 pp21/47) Ö Here are a
couple of short points which may help. Firstly, ÉPage printingæ via a
printer driver.
8.11
The key SYS calls recommended for Éproperæ printing via the
desktop still work in non-Wimp mode, so it is fairly straightforward to
produce hard copy of text output directly from Basic programs Ö albeit
in Égraphic/page printingæ style.
8.11
A sequence which certainly works is:-
DEF PROCprint
SYS öPDriver_PageSizeò TO width%,
height%,left%,bottom%,
right%,top%
pf%=OPENOUT(öprinter:ò)
SYS öPDriver_SelectJobò,pf%,
öPrinter Testò
LOCAL ERROR
ON ERROR LOCAL:SYS öPDriver_AbortJobò,pf%:CLOSE#pf%
:
ENDPROC
rect%!0=0
rect%!4=0
rect%!8=(right%-left%)/400
rect%!12=(top%-bottom%)/400
trans%!0=1<<16
trans%!4=0
trans%!8=0
trans%!12=1<<16
plotat%!0=left%
plotat%!4=bottom%
SYS öPDriver_GiveRectangleò,0,rect%
,trans%,plotat%,&FFFFFF00
SYS öPDriver_DrawPageò,1,block%,0,0 TO more%
WHILE more%
ááSYS öColourTrans_SetGCOLò,0
ááMOVE 0,(top%-bottom%)/400
áá............
áá(BASIC print commands Ö see text)
áá............
ááSYS öPDriver_GetRectangleò,,block% TO more%
ENDWHILE
SYS öPDriver_EndJobò,pf%
RESTORE ERROR
CLOSE# pf%
ENDPROC
8.11
The above assumes that you have a global error call in
operation, and you will need to add to the ON ERROR LOCAL line to
restore to that call. Also, you need to have declared certain variables
earlier in the program, such as...
8.11
DIM rect% 16
DIM trans% 16
DIM plotat% 8
DIM block% 16
8.11
All the normal Basic printing commands seem to work OK, i.e.
PRINT, PRINT TAB(), VDU8, 9, 10 and 11, but be careful of VDU28 and 31
(and, ofácourse, VDU1).
8.11
With care, you can therefore merely insert (at Basicæs print
commands above) the call to whatever routine puts your required text
onto the screen.
8.11
Secondly, what about using of text files? Although it isnæt
printing directly from Basic, there are some advantages in using text
files, as others have noted Ö not least being that your printer driver
is likely to use Écharacter printingæ, and you can view and edit via
Edit, if you want.
8.11
Extending the thoughts offered by others (and assuming you want
to get a hard copy of something youæve put on the screen) then the
following PROCs can be used to put text line by line on the screen in
the way you want it and, at the same time, construct a corresponding
text file for subsequent dragging to your Printer Driver or into !Edit.
8.11
10 MODE27
20 file%=OPENOUT(ötextfileò)
30 CLOSE#file%
32 *SetType textfile Text
40 PROCfile_and_centreprint(öText File Testò)
50 PROCfile_and_blankline
60 PROCfile_and_printtab(10,öFirst Line at TAB 10ò,TRUE)
70 PROCfile_and_printtab(10,öSecond Line at TAB 10, but held ò,FALSE)
80 PROCfile_and_printtab(50,öto await this at TAB 50ò,TRUE)
90 END
10000
10010 DEF PROCtextfile(textline$, return%)
10020 REM return% is TRUE/FALSE flag
10030 REM to tell BPUT# to make
<RETURN> action after text or not
10040 file%=OPENUP(ötextfileò)
10050
10060 REM Put pointer to end of file ready for more text.
10070 PTR#file%=EXT#file%
10080
10090 IF return% THEN
10100ááBPUT#file%,textline$
10110 ELSE
10120ááBPUT#file%,textline$;
10130 ENDIF
10140 CLOSE#file%
10150 ENDPROC
10160
10190 DEF PROCfile_and_centreprint
(string$)
10200 REM Prints a string centred on screen,
10210 REM and puts a corresponding string into a text file.
10220
10230 LOCAL tab%,screenwidth%
10240 REM First find screenwidth in Mode being used,
10250 SYS öOS_ReadModeVariableò,-1,1 TO ,,screenwidth%
10260
10270 tab%=((screenwidth%+1)-LEN(string$)) DIV 2
10280 PRINT TAB(tab%)string$:REM To screen
10290
10300 line$=STRING$(tab%,ö ò)+string$
10310 PROCtextfile(line$,TRUE):REM Corresponding string to text file
10320 ENDPROC
10330
10360 DEF PROCfile_and_blankline
10370 REM Prints an empty line on screen,
10380 REM and puts a corresponding string into a text file.
10400 PRINT:REM To screen
10420 line$=öò
10430 PROCtextfile(line$,TRUE):REM Corresponding string to text file
10440 ENDPROC
10450
10480 DEF PROCfile_and_printtab(tab%,string$,crlf%)
10490 REM Prints a string on screen at the designated tab position,
10500 REM and returns a corresponding string for a text file.
10510 REM Écrlf%æ is TRUE/FALSE flag to determine if screen printing
10520 REM** is to end with <Return> or not (i.e. semi-colon or not).
10530
10540 gap%=tab%-POS
10550 REM Égap%æ needs to be calculated before printing to screen.
10560
10570 IF crlf% THEN
10580ááPRINT TAB(tab%)string$
10590 ELSE
10600ááPRINT TAB(tab%)string$;
10610 ENDIF
10620
10630 line$=STRING$(gap%,ö ò)+string$
10640 PROCtextfile(line$,crlf%):REM Corresponding string to text file
10650 ENDPROC
8.11
I am still trying to get Écharacter printingæ via a Printer
Driver direct from Basic!
8.11
(We have one that we have used at NCS for years. Iæll put it on
the monthly disc. Is that what you want? Ed.)
8.11
Ray Favre, West Drayton
8.11
Runny letters Ö Some people donæt realise that the ink used by
inkjet printers is water-based and is therefore not waterproof. This
isnæt normally a problem but it can become one when addressing
envelopes! In rainy weather, my postman often delivers letters where the
address is all but illegible, and if the ink had run in this way before
it had reached my local sorting office, I would probably never have
received it.
8.11
The solution is very simple. Most stationers sell a Éfixeræ for
use with rub down lettering (Letraset etc.). This is actually a very
fine, clear, varnish in aerosol form. Itæs quite expensive, around ú3,
but a can will last many years. Just lightly spray it on the address or
label (it dries in a few seconds) and your letter will arrive safely
even in a monsoon.
8.11
David Holden, APDL
8.11
Transferring text files using Hermes Ö There is an increasing
interest these days in exchanging text files between Acorn RISC
computers and PCs. There are two major differences Ö PC text files end
with a ctrl-Z (ASCIIá26) character and have CR LF (ASCII 13 +áASCII 10)
characters at the end of each line. Acorn text files have only an LF
character at the end of a line and have no special end character. Hermes
(v1.22 onwards) is able to handle most of the conversion in either
direction.
8.11
To convert an Acorn file to PC, open the Hermes application
window and display the Pipe parameters. Change the Line End to CRLF and
click on öOKò. Drag the text file to Edit, use <ctrl-down> to move the
cursor to the end of the file and add ñCTRLZñ, then resave. Ensuring
that no application has the input caret, drag the text file onto the
Hermes iconbar icon. After a few moments, the converted file will be
piped to Edit where it can be saved to the DOS disc.
8.11
To convert a PC file to Acorn, change the DOS file to Text
(&FFF) and open an Edit document, making sure it has the input focus.
Drag the DOS file onto the Hermes iconbar icon and the converted file
will be sent direct to the edit document with all the CR characters
stripped out. The ctrl-Z character at the end can be deleted manually.
8.11
Hermes raison dæetre is to facilitate transfer between packages
and this cross-platform interchange is an extension of that philosophy.
8.11
Mike Logan, Base 5 Technical Graphics
8.11
Underlining Impressionæs bugs Ö If you are editing a style, and
adding ÉUnderlines 2æ to it in Publisher (4.05), make sure that any
existing text in that style does not have underlines set as an effect.
If the effect is set, strange things happen, andáthe window goes black!
8.11
Brian Cocksedge, Midhurst, W Sussexáuá
8.11