12-56
Creating A Script File
More than one setting within the same group of parameters can be specified on the
same line. For example, to set the baud rate to 9600 and the serial port device to /dev/
ttya you would enter the following:
pset host baud 9600 port "/dev/ttya"
In this case the group ID only has to be entered once at the beginning of the line,
followed by each set of parameter IDs and values.
You can also use the pset command to define key macros. The following example
will define the F1 key so that when it is pressed in conjunction with the Shift and
Ctrl keys (s c) it will send the string in the double quote characters:
pset macro s c XK_F1 "logon_n_r"
Note that when you want to enter a control character in a definition you must use the
three digit decimal value of the ASCII character preceded by an underscore
character. Values with only two digits must be preceded by a zero. For example, the
decimal value of CR is 13, so this would be entered as _013. You cannot use a
control key character equivalent (e.g. ^M for CR) in a PSET definition.
Refer to the section entitled PGET & PSET Parameters & Values at the end of this
chapter for a complete list of group ID's, parameter ID's and values, and the
abbreviations that can be used.
PUT
Syntax: PUT <string>
PUT <variable>
Send the string(s) within double quote characters or variable(s) to the host.
QUIT
Syntax: QUIT
The script program terminates and TeemTalk is exited.
RAND
Syntax: RAND <variable>
This will put the next random number into the variable, which can be a floating point
number or string variable. The number will be less than 1. If an integer variable is
used then the variable will always be 0 (zero). See also the description of the seed
command.