-
Notifications
You must be signed in to change notification settings - Fork 8
setTextOutTrigger
Purpose: Creates a trigger that will activate when certain text is received from one of TWX Proxy's telnet clients.
Syntax: setTextOutTrigger {name} {label} [{value}]
{name}: The name of the trigger to create. This name is used for later references to the trigger.
{label}: A label within the script to jump to when the trigger is activated.
[{value}]: A value that must be matched with the outgoing text for the trigger to activate.
Notes: Triggers mark the way in which TWX Scripts interact with their environment (Trade Wars).
The TextOut trigger will automatically jump to a label within the script and begin executing as soon as text is received from a client terminal containing the specified value. The outgoing text will be stored within a buffer and can be retrieved using the "getOutText" command. After a TextOut trigger has been activated, the original outgoing text is held and will not be sent until it is passed to a "processOut" command.
Note that no triggers will activate unless the script has been paused with a "pause", "waitFor" or "waitOn" command.
Example:
.