Example:
Using RDYMSG in a
Batch File
This example demonstrates how to use a batch file to send
PJL commands to the printer. In this example, the batch
file acts as a spooler, using the RDYMSG command to
display the file name while a print file is being downloaded.
To send PJL commands this way, first create an ASCII file
named UEL, containing only the UEL command
(
<ESC>%-12345X
). In this file, be sure to substitute ASCII
character 27, the escape character, for <ESC>, and do not
add any spaces or characters after the X.
Then create a batch file as shown here, and save it as
PRINTPJL.BAT, in the same directory as the “UEL” file.
The batch file uses the DOS ECHO command to send PJL
commands, and the DOS COPY command with the binary
option to send the UEL file and the pre-existing print file to
the printer.
@ECHO OFF
CLS
ECHO Printing the %1 Job!
COPY UEL /B PRN:
ECHO @PJL > PRN:
ECHO @PJL JOB > PRN:
ECHO @PJL RDYMSG DISPLAY = "%1" > PRN:
ECHO @PJL ENTER LANGUAGE = PCL > PRN:
COPY %1 /B PRN:
COPY UEL /B PRN:
ECHO @PJL COMMENT Restore READY message > PRN:
ECHO @PJL RDYMSG DISPLAY = "" > PRN:
ECHO @PJL EOJ > PRN:
COPY UEL /B PRN:
@ECHO ON
To use this batch file, type the name of the batch file,
followed by the name of the print file, as follows:
PRINTPJL printfilename
The printfilename is displayed while the job is being
downloaded to the printer.
C-4 Programming Examples
Содержание 4600 - Color LaserJet Laser Printer
Страница 18: ...1 6 Introduction to PJL ...
Страница 36: ...3 8 Using PJL ...
Страница 46: ...4 10 Kernel Commands ...
Страница 66: ...Figure 6 1 How Environments Affect the Print Job 6 4 Environment Commands ...
Страница 108: ...6 46 Environment Commands ...
Страница 180: ...9 18 PJL File System Commands ...
Страница 212: ...10 32 Programming Tips ...
Страница 262: ...B 6 PJL Command Summary ...
Страница 302: ...Glossary 10 ...