home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
text
/
golded
/
data
/
tools
/
hispeed
/
arexx
/
evenodd.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-02-27
|
2KB
|
86 lines
/* Print either even or odd pages */
options results
shell
address HISPEED.1
SET REQUESTER ON
SET ASK "This macro will print either even or odd pages.|Proceed ?"
if RESULT = 1 then
do
QUERY JOBS /* anything to print ? */
if RESULT = 0 then
REQUESTFILE /* no, ask for files */
QUERY JOBS /* anything to print now ? */
if (RESULT ~= 0) then /* let's go ... */
do
QUERY PORT /* remember current output port */
oldport = RESULT /* for clean exit */
QUERY OUTFILE /* remember current output file */
oldfile = RESULT /* for the same reason */
set PORT FILE /* set port/file to known state */
set OUTFILE 'T:PCL'
PRINT /* create output (even/odd) */
do until (choice = 'Q')
say ' '
say ' Options: '
say ' -----------------------------------------'
say ' [e] even pages '
say ' [o] odd pages '
say ' [q] quit '
say ' '
say ' Note: even pages should be printed first.'
say ''
pull choice
shell
if (choice = 'E') then do
say ''
say ' printing even pages ... please wait'
if (oldport = 'SER:') then
copy 'T:PCL_pass1 SER:'
else
copy 'T:PCL_pass1 PAR:'
end
if (choice = 'O') then do
say ''
say ' printing odd pages ... please wait'
if (oldport = 'SER:') then
copy 'T:PCL_pass2 SER:'
else
copy 'T:PCL_pass2 PAR:'
end
address HISPEED.1
end
set PORT oldport /* restore user's preferences */
set OUTFILE oldfile /* restore user's preferences */
say ''
say ' (done - please close window)'
end
end