Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Send ESC Commands from DOS 1

Status
Not open for further replies.

Darrenzo

Technical User
May 29, 2003
35
0
0
GB
Hi folks,

How do you send a printer control string to a printer in DOS?

I have an Epson Receipt printer and cash drawer and need to send an ESC printer control command to it to open the cash drawer. From the windows printer driver (its installed in windows as a generic text only) properties-> Printer Commands, I can send the hex string (the string is <1b><70><30><32><FA> for anyone searching for the command for an Epson TM-T88III) and the drawer opens.

I want to send the same command using a batch file in DOS. I know that the <ESC> character is entered in Edit as <Ctrl>+P then <Ctrl>+[ to begin the control command sequence (a small arrow appears on the screen to indicate the control character). Aftr that I am not sure what to do. The command in the manual in ASCI is: ESC p 48 50 250
In hex it is: <1b><70><30><32><FA>

My problem is I don't know how to put this all together and send it to the printer. When I try:
echo <ESC>p 48 50 250 >lpt1
The printer prints "48 50 250".

How do I send the whole command to the printer??

All help appreciated.

:eek:]
 
use a hex editor. For windows try frhed, The Free Hex Editor. save the file and then copy to lpt1.

copy myhexfile lpt1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top