Xerox -05W Printer User Manual


 
12-46
Creating A Script File
HGET
Syntax: HGET <variable> [, <count> [, <timeout>]]
This gets one or more characters from the host and assigns them to the specified vari-
able, where
<count> is the number of characters to get from the host. If omitted then one
character will be returned.
<timeout> is the maximum number of seconds during which the operation has to
take place before timing out.
If the format of the variable is not a string (as defined by the var command) then the
ASCII decimal value of the character(s) will be placed in the variable (e.g. A will be
65).
Note: You can use the conv command to convert the decimal
value to an ASCII character.
Examples:
hget char Gets one character from the host.
hget str, 5 Gets five characters from the host.
hget str, 5, 10 Gets five characters from the host, timeout after 10 seconds.
The system flag will be set to FALSE and the errno (error number) variable will be
set to 0 if a timeout occurs, or TRUE and errno set to 1 if the command was
successful.
HRCV
Syntax: HRCV IGNORE
HRCV PROCESS
HRCV HOLD
This command specifies what happens to characters received from the host while the
script program is running.
When set to ignore, characters will be thrown away. When set to process, characters
will be processed as normal. When set to hold, characters will be held but not
actioned until an hrcv process command is received, except for the hget or hcmp
commands, which will be processed. The ignore, process and hold settings can be
abbreviated to I, P, and H, respectively.