home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
sampler0
/
setup2.doc
< prev
next >
Wrap
Text File
|
1989-04-24
|
4KB
|
75 lines
SETUP2.COM
Command
Jeff Prosise
1989 No. 10 (Utilities)
Purpose: Sends menu-selected or typed control codes to a printer from
within an application or from the DOS prompt.
Format: SETUP2 [d:][path][filename] | [/C codes] | [/U]
Remarks: Entered without the /C option, SETUP2 becomes a RAM-resident
utility with a pop-up menu of user-configured printer control sequences
specified in filename. The default hotkey is Ctrl-Right Shift. Esc closes the
menu window and returns to any already-running application. Entering SETUP2
with the /U option uninstalls the utility if no subsequent TSR program has been
loaded.
Any ASCII text editor or word processor can be used to create
filename, which contains the desired printer commands. This file may be up to
64KB in overall size, and may contain any number of lines, each each of which
must be ended by pressing Enter. The first line identifies the printer or
company (hit Enter alone to leave it blank), and may be up to 26 characters
long. Subsequent lines consist of up to 20 characters of identifying ASCII
text, followed by a semicolon, followed by up to 255 bytes containing the
printer control sequence. For example, the first four lines of a filename for
an H-P LaserJet might be entered thus:
H-P LASERJET
Spreadsheet; 27,"&l1o2e5.647c66F",27,"&k2S"
Reset Printer; 27,"E"
Form Feed; 12
ASCII 27 is the (decimal) Escape character; it could alternatively be
entered in hexadecimal notation as x1B or 0x1B, following the C-language style.
Numeric entries may be separated by commas (as shown), or by spaces or tabs.
Literal ASCII text must be enclosed either within double quotes (as shown) or
single quotes. White space to the right of the semicolon is ignored, and any
line in filename beginning with a pound sign (#) is treated as a comment line
and will not appear in the SETUP2 window.
In the example just cited, when the SETUP2 menu is popped up with Ctrl-
ight Shift, the words "Spreadsheet," "Reset Printer," and "Form Feed" will
appear next to lines identified as F1, F2, and F3. The associated printer
control codes do not appear in the on-screen menu, but are sent to the printer
either by pressing the indicated function key or by moving the menu highlight
bar to the appropriate line with the Up- and Down-Arrow keys and pressing Enter.
The PgDn and PgUp keys bring lines in filename beyond the first "page" (ten
lines) into the menu window.
Below F10 in the SETUP2 menu is a blank line that may be used to send
printer control sequences not contained in filename. This line is accessed by
pressing the forward slash (/), typing in the actual control codes (using the
format conventions previously discussed), and pressing Enter. In this case, the
actual printer codes are shown on the screen; the entry line scrolls
horizontally to accommodate sequences of more than 26 characters.
Entering SETUP2 with the /C option enables sending printer control codes
from the DOS command line without making the utility RAM-resident. This is
useful both for testing and for batch file operations. The codes are again
entered with the numeric and quotemark conventions previously indicated. Note
that each line must end with an ASCII 13,10 (carriage return/line feed)
sequence.
By default, SETUP2 uses LPT1. Users familiar with DEBUG.COM can change
the entry at offset 018A (normally 0) to 1 (for LPT2) or to 2 (for LPT3).
Similarly, the default Ctrl-Right Shift hotkey can be changed to another
shifting key combination by changing the entry at offset 01B3 (normally 5). A
hex value of C in this location would change the hotkey to Ctrl-Alt, for
example. A complete table of shift-mask values is printed in the original
article.
«MDNM»