home *** CD-ROM | disk | FTP | other *** search
- ECHO Printer Control
- (PC World March 1987 Star-Dot-Star)
-
- You can use the ECHO command with the redirection symbol to send
- escape sequences and control codes to a printer. This technique works
- from within batch files, or you can type the commands directly from
- the keyboard.
- Most printer control sequences begin with the escape character;
- however, pressing <Esc> while issuing a DOS command cancels that
- command. The trick is to use the ASCII 155 character, which many
- printers interpret as a normal escape character. To generate the
- character, hold down the <Alt> key while entering 155 on the numeric
- keypad.
- Enter the remainder of the printer control sequence immediately
- after the escape character, without any intervening spaces. You can
- type any character, or you can hold down the <Alt> key and enter a
- decimal ASCII character value directly on the numeric keypad.
- For example, to send the sequence Escape E to trigger emphasized
- printing, you would type ECHO followed by a space, hold down the <Alt>
- key while typing 155 on the numeric keypad, release <Alt>, and then
- type E, a space, and > PRN. This last part of the command redirects
- output of the ECHO command to the printer instead of the screen.
- The printer must be in a "character set" mode so it will recognize
- the escape sequence as a printer control code. Otherwise the characters
- will print instead of controlling the printer. On an IBM Proprinter,
- for instance, you must send all of the control codes before selecting
- character set 2 (character set 1 is the default).
- Note, too, that a single ECHO command can send more than one
- escape sequence. For example, if you want to select 12-pitch, double-
- strike, underlined printing, the escape sequence for an IBM Proprinter
- would be <Esc>:<Esc>G<Esc>-1.
- You may want to include frequently used printer control sequences
- in your system's AUTOEXEC.BAT file to configure the printer
- automatically whenever you turn on the computer.
-