RUN(OPCS) Optical Printer Control System RUN(OPCS)
NAME
run - execute a command script
USAGE
run [filename] {optional linenumber}
EXAMPLES
run test.run # start executing commands from TEST.RUN
run test.run 5 # execute test.run starting at line #5
do 12 run test.run # execute test.run 12 times
DESCRIPTION
Tells the OPCS software to execute commands from a 'run' file.
Whatever commands you can type interactively can appear in a RUN
file. Several commands can appear on a line, and comments can be
used through-out. NEWLINES, SPACES and TABS can be used as necessary
to separate lines or blocks of code.
Usually RUN(OPCS) executes the entire file, however you may tell
RUN to start execution at a certain LINE NUMBER, which is an optional
argument that should appear after the filename. If the argument isn't
supplied, '1' is always the default.
The file should be an ASCII text file, and can be created by:
1) The LOG(OPCS) command
2) A text editor
3) Your own software tools
DISABLING ECHOING
Following the DOS standard, any lines in a run script file can start
with '@' to prevent the line from echoing to the screen while the script
executes. This is useful for preventing commands echoing to the screen
that do not need to be seen by the operator. For example, the 'pse'
command in the example below:
# INSERT ND FILTER
@pse # wait for the operator to hit a key
In this case, '@' in front of 'pse' prevents the entire line from echoing
to the screen. When the above is executed, one sees:
# INSERT ND FILTER
Hit RETURN to continue, or ALLSTOP to abort:
If the '@' were removed, one would see the following more confusing
output when executed:
# INSERT ND FILTER
pse # wait for the operator to hit a key
Hit RETURN to continue, or ALLSTOP to abort:
RECURSIVE RUN COMMANDS
If the LOG(OPCS) command is in effect and a RUN command is executed,
only the RUN command will appear in the log file (the LOG file will
not start filling with the contents of the script that was called).
You can have run scripts call other run scripts. Keep in mind that
you must adjust FILES in your DOS 'CONFIG.SYS' file to be 20 or
more, depending on how many levels deep you want run scripts to
call one another. These are recommended commands for your CONFIG.SYS
file:
FILES=20
BUFFERS=40
DEVICE=ANSI.SYS
Scripts that call themselves, or that call parenting scripts will
cause 'recursion' errors. This protects the user from creating
a situation that calls itself infinitely, which would inevitably
bomb out when the operating system runs out of open file handles.
LIMITS
You can nest RUN(OPCS) commands up to 20 levels deep.
BUGS
none yet.
SEE ALSO
DO(OPCS) - repeat a string of commands several times
RUNCMD(OPCSDEFS) - define built in OPCS commands as run scripts
LOG(OPCS) - log all commands entered by the user
RUN(OPCS) - run a log file
LOGCOUNTERS(OPCSDEFS) - enable/disable logging counters to logfiles
LOGFORMAT(OPCSDEFS) - formats how values are printed to logfile
ORIGIN
Gregory Ercolano, Los Feliz California 12/16/89