- Escape sequence in batch file ??
- Posted by InOverMyHead on May 30th, 2007
How can I send escape sequences to a (PCL-5 LaserJet) printer. Maybe a
command-line entry?? or put into a batch file?
For example, to eject a page - <Esc>?&l0H
Is there any little utility program that will pass the common sequences to a
printer? Or is it a hex editor I need? If so, how do I enter the <Esc> ?
Any help would be greatly appreciated.
Bob
- Posted by foxidrive on May 30th, 2007
On Wed, 30 May 2007 17:38:09 GMT, "InOverMyHead"
<bbart@nospam.earthlink.com> wrote:
The MSDOS EDIT text editor can insert literal characters by using Control P
and then pressing escape. The escape character looks like a backward
facing arrow in Edit.
--
Posted via a free Usenet account from http://www.teranews.com
- Posted by InOverMyHead on May 31st, 2007
Good - it seems to insert the sequence okay.
Now - anybody know how to send it to a printer? Let's assume it is LPT1. Or
as extra credit, let's try sending it to a printer on port USB001.
Bob
"foxidrive" <gotcha@woohoo.invalid> wrote in message
news:brer53585jv8objkknivrfheke6a52sdqb@4ax.com...
- Posted by Franc Zabkar on May 31st, 2007
On Wed, 30 May 2007 17:38:09 GMT, "InOverMyHead"
<bbart@nospam.earthlink.com> put finger to keyboard and composed:
You can use DOS's Debug command to create a PCL command file:
debug
-e 100 1b "?&10H"
-d 100 105
12EB:0100 1B 3F 26 31 30 48 .?&10H
-rcx
CX 0000
:6
-n ejectpag.pcl
-w
Writing 00006 bytes
-q
You could also use DOS's Edit command to view this file:
edit /r /64 ejectpag.pcl
The decimal value of the character under the cursor is displayed at
the bottom of the screen.
I suppose you could use an "echo" command to send the PCL string from
within a batch file, but I'm not sure whether the trailing <CR><LF>
would create a problem for you.
- Franc Zabkar
--
Please remove one 'i' from my address when replying by email.
- Posted by foxidrive on May 31st, 2007
Copy file.txt prn
On Thu, 31 May 2007 06:06:04 GMT, "InOverMyHead" <bbart@nospam.earthlink.com> wrote:
--
Posted via a free Usenet account from http://www.teranews.com
- Posted by Matthias Tacke on May 31st, 2007
InOverMyHead wrote:
Depending on your os (which you didn't mention) you might have to
share your printer and then
net use lpt1: \\yourPC\yourPrinterShare
to be able to copy to lpt1-9 or use the printer with older dos apps (mostly
only lpt1-3).
--
Greetings
Matthias