Category : Lotus and other Spreadsheets
Archive   : LTSTIPS3.ZIP
Filename : PRINT.123
Output of file : PRINT.123 contained in archive : LTSTIPS3.ZIP
(PC Magazine Vol 3 No 17 Sept 4, 1984 User-to-User)
This list shows the available print fonts and their associated
control codes. Some of the control codes don't require the Escape
(ASCII 027) code (ASCII 015 control code, for example); however, using
it doesn't affect the string and for the beginner or the user who
doesn't use control codes that often it is easier just to put it in
front of everything.
Also included is a copy of the macro used to print the font list.
Enter these codes while using an Epson/IBM dot matric printer and the
/Print Printer Options Setup command.
- - - - -
/ppa
rA1..B5~ Double Width Mode
os{esc}
\027\064\027\087\001~
qg
rA6..B9~ Double Width OFF
os{esc}
\027\087\000~
qg
rA10..B13~ Double Width Emphasized
os{esc}
\027\064\027\087\001\027\069~
qg
rA14..B17~ Emphasized Mode OFF
os{esc}
\027\070~
qg
rA18..B21~ Double Width Italic
os{esc}
\027\064\027\087\001\027\052~
qg
rA22..B25~ Regular Emphasized
os{esc}
\027\064\027\069~
qg
rA26..B29~ Italics
os{esc}
\027\064\027\052~
qg
rA30..B33~ Compressed
z027\064\027\015~
qg
rA34..B37~ Compressed Italic
os{esc}
\027\064\027\015\027\052~
qg
rA38..B41~ Double Width Compressed
os{esc}
\027\064\027\087\001\027\015~
qg
rA42..B45~ Subscript
os{esc}
\027\064\027\083\001~
qg
rA46..B49~ Italic Subscript
os{esc}
\027\064\027\052\027\083\001~
qg
rA50..B53~ Underline Subscript
os{esc}
\027\064\027\045\001\027\083\001~
qg
rA54..B57~ Compressed Subscript
os{esc}
\027\064\027\015\027\083\001~
qg
rA58..B61~ Compressed Italic Subscript
os{esc}
\027\064\027\015\027\052\027\083\001~
qg
rA62..B65~ Compressed Italic Underlined
os{esc}
\027\064\027\015\027\052\027\045\001~
qg
rA66..B69~ Printer RESET (including Top of Form)
os{esc}
\027\064~
qgq
-----------------------------------------------------------------
Embedding Printer Codes in 1-2-3 Worksheets
(PC Magazine Vol 4 No 13 June 25, 1985 Spreadsheet Clinic)
It's possible to print out a 123 worksheet with different type
faces in different places. By breaking the worksheet up into ranges
and printing each range sequentially with a different printer setup
string, you can have double-width titles, boldface totals and so forth.
However, printing in chunks is tedious business. If you could put the
printer codes within the worksheet exactly where you want them, you
could print the whole worksheet in one piece.
The BASIC program below creates a file of printer codes that can
be read right into your worksheet. Once you have the codes, you can
copy them wherever you like within the worksheet and thus control the
printer from any cell.
This program contains control codes for the Epson series of
printers, but since it is in BASIC, you can easily rewrite it to suit
your own printer. You only need to run it once; it will cre-ate a small
file called 123PRINT.PRN. Read it into your spread-sheet with the /File
Import Numbers command, and you will get a screen display of the control
codes and their functions.
To have a single word in your spreadsheet print in italics, copy
the italics control codes to the cell where you want italics: <-4XXX<-
5. In this example, <- represents the left-arrow that appears in the
spreadsheet as the "escape" symbol. Then edit that cell, replacing XXX
with your text.
Since <-4 turns on italics and <-5 turns it off, only the text
sandwiched between them will be italicized. If you want a whole block
of text in italics, delete <-5 from the end of the cell. Write your
text. Then copy the control codes once again, this time to the point
where you want italics to end, and edit out everything but <-5.
If you want to use combined print modes, such as emphasized
italics or double-strike compressed, you can custom build the proper
control codes by using the string of escape (<-) symbols provided. For
emphasized italics, copy the string of escapes to the cell where you
want the text, and add characters and delete escapes until it looks
like this:
<-E<-4 TEXT GOES HERE <-5<-F
The program also gives you a "compress" symbol followed by a string of
escapes, because that symbol, too, is not a regular character. Use
that code for combined modes that include compression. Since the
123PRINT.PRN file is so small, you can copy it onto your 123 master
disk and read it into a worksheet whenever you need it.
Editor's Note: This lets you do a lot more than give your printer
a workout. By putting a backspace between two characters, for example,
you can overstrike your zeros with backslashes, or combine a Y and an
= to make a yen currency symbol. It's nice to have a beep code, too.
Put a few at the end of a big worksheet the next time you decide to
print it. So long as you stay within earshot, you can go off and do
something else until the printer calls and tells you it's finished
printing.
- - - - -
10 'Program to create print codes for the Epson series printers
20 'to be used in individual cells in Lotus 1-2-3
30 '
40 X$="XXX"
50 E$=CHR$(27):CTRLO$=CHR$(15):CTRLR$=CHR$(18)
60 ZERO$=CHR$(0):ONE$=CHR$(1):TWO$=CHR$(2)
70 THREE$=CHR$(3):FOUR$=CHR$(4):FIVE=CHR$(5)
80 SIX$=CHR$(6):SEVEN$=CHR$(7):EIGHT$=CHR$(8)
90 '
100 'To use in 123, substitute text for XXX
110 '
120 CON$=CTRLO$+X$+CTRLR$
130 WIDE$=E$+"W1"+X$+E$+"W0"
140 EMPH$=E$+"E"+X$+E$+"F"
150 DOUBLE$=E$+"G"+X$+E$+"H"
160 ITALIC$=E$+"4"+X$+E$+"5"
170 UNDER$=E$+"-1"+X$+E$+"-0"
180 SUPER$=E$+"S0"+X$+E$+"T"
190 SUB$=E$+"S1"+X$+E$+"T"
200 ELITE$=E$+"M"+X$+E$+"P"
210 ESCS$=E$+E$+E$+E$+E$+E$+E$+E$+E$+E$+E$+E$
220 CONESCS$=CTRLO$+E$+E$+E$+E$+E$+E$+E$+E$+E$+E$+E$+E$=CTRLOR$
230 '
240 '
250 BACK$=EIGHT$
260 MANYBACK$=EIGHT$+EIGHT$+EIGHT$+EIGHT$+EIGHT$
270 BELL$=SEVEN$
280 FILE$="b:123print.prn"
290 OPEN FILE$ FOR OUTPUT AS #1
300 WRITE #1,CON$,"condensed"
310 WRITE #1,WIDE$,"wide"
320 WRITE #1,EMPH$,"emphasized"
330 WRITE #1,DOUBLE$,"double strike"
340 WRITE #1,ITALIC$,"italics"
350 WRITE #1,UNDER$,"underline"
360 WRITE #1,SUPER$,"superscript"
370 WRITE #1,SUB$,"subscript"
380 WRITE #1,ELITE$,"elite print"
390 WRITE #1,BACK$,"backspace"
400 WRITE #1,MANYBACK$,"several backspaces"
410 WRITE #1,BELL$,"bell"
420 WRITE #1,ESCS$,"escapes"
430 WRITE #1,CONESCS$,"condensed + escapes"
440 CLOSE
450 END
-----------------------------------------------------------------
Extended Characters in 1-2-3
(PC Magazine Vol 4 No 14 July 9, 1985 Spreadsheet Clinic)
In PC Vol 4 No 13 (above) we published a BASIC program that writes
123 printer control codes or the IBM extended character set to a disk
file. If you read that file into a worksheet with the /File Import
Text command, you can then copy any of those characters anywhere within
the worksheet, for printer control or fancy graphics effects. Here's a
different way to do the same thing: it uses 123's translation utility
instead of BASIC.
You can use the following procedure to use the IBM extended
character set and printer control characters from within a worksheet.
The procedure involves creating the special characters outside of 123
and then loading them in as needed.
Step 1. Create a dummy worksheet with "place holder" cells where
you would like special characters to appear. The cell entries should
be text; for example, the letter Z.
Step 2. Safe the worksheet and call it EXTEND.
Step 3. Exit 123 and enter the TRANSLATE utility.
Step 4. Convert the worksheet (EXTEND.WKS) to DIF (EXTEND.DIF).
Step 5. Exit Lotus entirely.
Step 6. Use a word processor that lets you use the entire IBM
character set and retrieve the file EXTEND.DIF
Step 7. Go through the file and where you find a Z, change
it to the character or printer-control code that
you want to put in your spreadsheet.
Step 8. Save the file using the same name (EXTEND.DIF).
Step 9. Return to the 123 TRANSLATE utility and convert
the now modified DIF file to WKS (EXTEND.WKS).
Use the columnwise translation option.
Step 10. Exit the TRANSLATE utility, enter 123, and
retrieve the translated file (EXTEND.WKS).
You can now use the /Copy command to move these characters
wherever you may need them within the worksheet. If you have a printer
like the HP LaserJet that uses very long printer codes, you may have no
choice but to embed the codes within your worksheet, because the
printer-setup string is limited to 39 characters. You can also create
fancy borders, error warning messages, or customized help screens. You
should realize that many of the characters you see on the screen will
not print on your printer unless it is mapped to the IBM character set.
An easy way to use the characters and control codes is to put them
all in a single worksheet and store it on your data disk. By assigning
appropriate range names (such as the ASCII numbers), you can use the
/File Combine command to retrieve the characters you want. A macro,
such as the following, will work:
/fccn{?}~filename
Editor's Note: This is an attractive alternative to the procedure
discussed in the last issue. Using XyWrite II to modify the DIF file,
a few of the extended characters mysteriously refused to appear in the
WKS file. Maybe other word processors will behave differently. Since
the WKS to DIF to WKS translation process is cumbersome, I used XyWrite
to create a plain ASCII text file containing the extended characters,
and then read it into 123 using the /File Import Text command. Only a
few of the extended characters came through properly. Apparently the
translation is a necessary step. However, if you keep the whole
character set in a worksheet on disk, you'll only use the translation
procedure once.
-----------------------------------------------------------------
Continuous Printing of Files
(PC Magazine Vol 4 No 13 June 25, 1985 Spreadsheet Clinic)
Printing all the files on a disk is a monotonous chore. But with
one simple macro, 123 will print every file on your disk while you go
away and do something more exciting. The trick is to put this little
macro in each file on the disk:
/ppagpq ; print file and realign paper
/fe~~ y ; delete file you just printed
/fr~ ; retrieve next file
The next time you need to print out all the files, go through them and
change the name of this macro to \0 (0 or O?) so that it autoexecutes.
(You might give it a different name in the first file just to maintain
some control.) Since this series of macros will eventually leave you
with a blank disk, copy all your data files to a new disk. Then
invoke the macro on the first file and take a break while the files
print out unattended.
Editor's Note: I racked my brains trying to think of an easy way
to get rid of line 2 of the macro that erases the file just printed.
Without that step you wouldn't have to copy the files every time you
wanted to print, but it does guarantee that you will retrieve and print
every file on the disk in sequence. The only thing I could think of
was to replace lines 2 and 3 with /fr{right}~ in the second file,
/fr{right}{right}~ in the third file, and so on, but that may be more
trouble than it's worth.
-----------------------------------------------------------------
Printer Setup Files
(PC Magazine Vol 4 No 16 Aug 6, 1985 Spreadsheet Clinic)
If you have different printers connected to a PC and have trouble
keeping track of the different printer setup codes needed to control
each one, you can work out a system of printer setup worksheets.
These files contain no data -- only a printer setup string. Merge
the appropriate worksheet into a file when you are ready to print.
For example, the control code to make the DEC LA100 printer run at
12 pitch is Esc[2w. To set up a 123 printer setup file, you clear the
worksheet, give the /Print Printer Options Setup command, and enter the
string 027/091/050/119. Then save the file using as descriptive a name
as possible, e.g., LA10012P.WKS.
Then, whenever you have a spreadsheet to print on the LA100 in 12
pitch, first do a /File Retrive of LA10012P. Then do a /File Combine
Copy Entire of the spreadsheet you want to print. This puts the right
setup string in your spreadsheet without having to fumble with the
printer codes.
Editor's Note: Another way to do the same thing would be to build
a worksheet that contained only the macros necessary to display and
execute a menu of different printer setup options. You might, for
example, have a file with a menu for the various setup options for the
DEC LA100. You could then retrieve that file, choose the right option,
and let the macro write the setup string. Then, since the next
operation will be a /File Combine, the macro would erase all the cells
in the setup worksheet. You could then combine the file you want to
print and get the same results as described above. This method has the
advantage of requiring only one printer setup file per printer. The
above method requires a file for every single printer option, though
it's foolproof and much simpler to implement.
-----------------------------------------------------------------
Printer Setup Files
(PC Magazine Vol 4 No 22 October 29, 1985 Spreadsheet Clinic)
If you use the printer setup files suggested in Vol 4 No 16
(August 6, 1985 above), you have to save a worksheet and then combine
it with the setup string worksheet before you print. This may not
actually take very long, but it can seem like an eternity as you sit
and watch the Wait indicator. You can use this method and also avoid
most of the wait if you merge a small setup string worksheet into a
large worksheet rather than vice versa. First, make a small worksheet
for each printer or font style and give it an easily remembered name.
Each worksheet must contain the setup string as a label in cell 1A,
rather than as part of the printer settings. The rest of each
worksheet should be blank.
The macro shown below should be in the file you want to print.
Give the range names in column C to the cells to their right in column
D. Define PRANGE as the part of the spreadsheet you want to print.
When you run the macro, it will prompt you for the name of the printer
setup file you want to use. Enter the filename and its entire contents
will appear in cell D11. The worksheet will then print.
If you want to print the same worksheet on a different printer or
in a different style, just run the macro again and enter a different
filename at the prompt. You won't have to wait for lengthy /File Save
and /File Combine.
C D E
3 \P /xlEnter name of Setup File ~FILE Prompt for name of file
4 /rncHERE~{bs}~ Set current cursor position
5 {goto}SETUP~/fcce Copy file to SETUP
6 FILE Left open for filename
7 ~{goto}HERE~ Cursor return
8 /ppca Clear print settings
9 rPRANGE~ Establish print range
10 os Select setup option
11 SETUP Left open for setup string
12 ~ggq Print and quit
-----------------------------------------------------------------
Before You Start Printing .....
(PC Magazine Vol 4 No 17 Aug 20, 1985 Spreadsheet Clinic)
The command sequence below is recommended for the start of any
print macro. It is designed to eliminate three common reasons for
having to reprint a worksheet: 1) you forgot to recalculate the
spreadsheet before printing; 2) you didn't enter the date when you
booted the computer; and, 3) you forgot to align the paper. The macro
requires that three cells be named. One, called TODAY, contains the
formula @TODAY. Another, called JAN1,1980, contains @DATE(80,1,1), or
whatever the default date happens to be on your computer. The third,
which is called DUMMY, is nothing more than a dummy cell to complete
the /xl commands in the macro. The large number of spaces in the
second line of the macro cause the field limit to overflow and make the
computer beep, thereby drawing attention to the error.
Editor's Note: This way of making an error message beep is
especially clever, as is the check for the date. Since there is no way
to set the system date from within 123, if you are caught in the
IF-THEN statement of line 2, the macro ends, and you have to exit to
DOS and give the DATE command. In the macro, the number to the right
of TODAY (the result of @TODAY) is different from the number below it
(the result of @DATE(80,1,1)) because the proper date was entered at
boot-up.
{calc}
/xiTODAY=JAN1,1980~/xlError-Date not set! ~DUMMY~/xq~
/xlAdjust paper then press [RETURN]~DUMMY~
/pparPRINTRANGE~gppq
TODAY 31195
JAN1,1980 29221
DUMMY
-----------------------------------------------------------------
Printing a Worksheet of Unknown Size
(PC Magazine Vol 4 No 17 Aug 20, 1985 Spreadsheet Clinic)
It's often handy to use a macro to set the print parameters of a
worksheet, select the range and to the printing. However, if you have
changed the size of the worksheet since the time you wrote the macro,
the print range specifications in your macro will no longer be correct.
A macro below will print the entire worksheet even if you added or
subtracted lines. It uses the {end}{down} command to set the number of
the lines in the print range. This macro will work for a spreadsheet
of any number of lines and of four columns:
/PPR{home}.{end}{down}{right}{right}{right}~gq
The macro will work only if there are no blank cells in column A, since
the {end}{down} command will not necessarily take you to the last value
in the column but only to the next blank cell.
Editor's Note: The macro is fine, but it won't help if you have
changed the number of columns or have blank lines in column A. The
macro below is only a partial solution. It will print the spreadsheet
only as far as the cell named END. You can fiddle with the worksheet
size as long as you give this name to the cell just below the last data
cell. The macro will end up printing one blank line (because END) is
in a line below the data), but it will not print the contents of the
cell END because the macro erases that cell before printing. After
printing, the macro writes the word END into the cell just to remind
you where it is. This macro will work whether or not you delete
columns and rows from within the worksheet. If you are adding cells,
you have to remember either to give the range name END to the cell
below the last one in your worksheet or to be sure to insert rows and
columns in a way that does not disturb the cell already named END.
The macro:
{goto}END~ Goto cell named END
/re~ Erase contents
/ppcrr.{home}~ Clear print range, set new range
gq Go, quit
"END~ Write END in last cell
-----------------------------------------------------------------
Printing a Worksheet of Unknown Size
(PC Magazine Vol 4 No 24 Nov 26, 1985 Spreadsheet Clinic)
In the macro above (Vol 4 No 17), since the key-stroke combination
{end}{home} takes you to the bottom-right corner of the worksheet, the
best macro for printing a spreadsheet of unknown size is:
/PPR{bx}{home}.{end}{home}~gq
The backspace cancels any previous print range.
Editor's Note: If you happen to have shrunk your spreadsheet with
a /Range Delete of the bottom or right-hand edge before you print, 123
still thinks those deleted cells are part of the spreadsheet and {end}
{home} will send the cursor back to the previous limit before the
deletions. The print macro will therefore define and print a range
with blank cells in it. This isn't much of a lost, though, because it
means only that your printer will keep "printing" blank lines after
you think the print job is over, and baffle you if you can't figure
out why it won't stop.
-----------------------------------------------------------------
Spreadsheet Audit
(PC World September 1985 Star-Dot-Star)
You can produce cell-by-cell printouts of 123 worksheet formulas
and data in the familiar row-and-column worksheet format. The effect
is similar to that produced by commercial "spreadsheet auditing"
programs. In 123, use the /Range Format Text command and highlight the
entire worksheet. You can then use normal print commands to generate a
printed copy. You may wish to adjust the column widths to accomodate
the formulas, which are generally longer than their computed results.
Symphony performs the same feat with the Menu Format Other Literal
commands. Ranges, page numbers and grid coordinates will not be
printed but can easily be inserted with a text editor by directing the
printout to a disk file.
-----------------------------------------------------------------
Driving Color Printers with 1-2-3
(PC Magazine Vol 4 No 21 Oct 15, 1985 Spreadsheet Clinic)
If you have one of the new color printers (Epson JX, for example),
you will find that 123's Printgraph program can't drive it. Symphony,
however, can drive far more printers. As it happens, Symphony's
PGRAPH.EXE is virtually identical to 123's GRAPH.EXE. Thus, to get
around 123's limitation, you can set up a Symphony Printgraph disk that
will print 123 files on the printer of your choice.
Using Symphony's install program, establish a Symphony device
driver set that includes the graphics printer you want to use. Copy
that device driver set onto a copy of the Symphony Printgraph disk and
you have a utility that will print 123 graphs. If you want, you can
even run this disk from 123's Lotus Access system. Just copy LOTUS.COM,
LTSLOAD.COM and the 123 driver set (TD.DRV, GD.DRV, KB.DRV, and PR.DRV)
onto your new Printgraph disk. Then rename all three PGRAPH.* files to
GRAPH.*. When you first run the disk, you may get a configuration
error message. This is because you haven't configured the printgraph
disk yet. Just hit Escape. Then, use the Printgraph menu to save your
configuration options.
Editor's Note: If you do plan to run your new Printgraph disk
from the Lotus Access system, make sure that the Symphony device driver
set you establish in the first step of this procedure is called
LOTUS.SET. (Create it that way or rename it afterwards.) That is the
file the Symphony Printgraph program will look for when it's called
from the Lotus Access system. If your device driver set has a
different name, or if you have put together several sets to drive
several different printers, call the Printgraph program directly from
the DOS prompt with GRAPH xxxxx followed by a Return, where xxxxx is
the name of the driver set.
-----------------------------------------------------------------
Double-Spaced Spreadsheets
(PC Magazine Vol 4 No 24 Nov 26, 1985 Spreadsheet Clinic)
Sometimes it's handy to print a 123 spreadsheet double-spaced, in
order to review it and make changes. One way to do this is to put a
blank row between every line, but even with a macro, that's a tedious
job. Further, when it's time for a final printing, you have to go
through and take out all the blank rows.
An easier way is to put '. (a label prefix and a period) into
every cell in a column off to the right of your spreadsheet data.
Include that column when you define your print range, and the extra
periods will appear in the printout on lines by themselves between
each line of your spreadsheet. While the "blank" lines are completely
blank, the periods are easy to ignore. If you want to have triple or
quadruple spacing, just move the column or periods further to the
right. When you're ready for final printing, delete the column with
the periods and reset your print range.
Editor's Note: There's an important additional step you shouldn't
leave out. Be sure to set the right printing margin (PPOMR) wider than
your paper width. Otherwise, 123 will single space your spreadsheet
and print the column of periods all by itself on the next page. Get
rid of the periods in the printout by using spaces instead of periods
in the extra column. 123 registers the spaces and doesn't consider
those cells blank, but it's smart enough not to print them.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/