


Format:
on "string" {sub-command};
The on script command causes PC Access to monitor data arriving from the host for the sequence of characters that make up "string". The "string" may contain wildcards. The on command is special in that it continually monitors the incoming data even when other script commands are executing. This on monitoring occurs for each script command in the block with the same label. Once your script begins executing a statement in a block with a different label, on monitoring ends.
If the "string" you specified arrives from the host, the on command immediately processes the sub-command following the "string". The sub-command can be any valid script command except for another on command, a wait, command, or a match command.
When the sub-command executes, it takes priority over any other script command currently executing, including a wait command.
Examples:
// Would send a return if the host sent the string "PRESS ENTER"
on "PRESS ENTER" send "^M";
// Would perform a goto to the labeled block called NEXT_BLOCK
// if the word "Welcome" is seen
on "Welcome" goto NEXT_BLOCK;


