Xerox -05W Printer User Manual


 
12-3
Creating A Script File
For example, to program a key or button so that it will run the script file myscript.scr
and assign the values value1 to variable ArgV1 and value2 to ArgV2, you would
enter the following in the key/button definition text box:
<'myscript.scr(value1,value2)'>
Refer to the Keyboard Macros and Soft Buttons sections in the Setup Menus chapter
for information on programming keys and buttons.
Using An Escape Sequence
A script file can be initiated remotely by using the following escape sequence:
ESC P 2 z filename ESC \
where filename can include arguments as described in the next section.
Assigning Values To Variables
You can specify the value of specific variables within the script file by using the ( )
combination immediately following the name of the script file to be run. For
example:
myscript.scr(value1,value2,etc)
Each value within the parentheses must be separated by a comma with no spaces in
between. The script decoder stores the number of values specified, also treating the
name of the script file as a value, in the integer variable ArgC. The values
themselves are assigned to the following ArgV string variables: ArgV0 contains the
name of the script file ("myscript.scr" in the example above), ArgV1 contains
"value1", ArgV2 contains "value2", and so on.
The ArgC and ArgV# variables are predefined by the script language and so are not
defined by the var command. Just use the variable names in the program where
applicable, remembering that the number of the ArgV# variable name must match
the location number of the value that will be entered on the command line.
It is up to the user to ensure that the values specified on the command line are in the
right order so that they are assigned to the correct ArgV# variables.