Skip to content

setAutoTrigger

MicroBlaster edited this page Dec 30, 2019 · 8 revisions

Purpose: Creates a trigger that will activate when a text containing a specific value has been received from the remote server and respond to that trigger with the specified text.

Syntax: setAutoTrigger {name} {value} {response} [repeat]

{name}: The name of the trigger to create. This name is used for later references to the trigger.

{value}: A value that is required to be in the block of incoming text for the trigger to activate.

{response}: The response to send when the trigger is activated.

[repeat]: Optionally set the number of times to repeat this trigger. Use 0 for infinite. The default value is 1.

Notes: The auto trigger will automatically respond to an event instead of jumping to a label within the script.

Note that no triggers will activate unless the script has been paused with a "pause", "waitFor" or "waitOn" command.

Example:

# Respond to pause prompts until trigger is killed.
SetAutoTrigger PAUSE "[Pause]" "a " 0

# Respond with a system varable & <enter> to the login prompt.
SetAutoTrigger LOGON "Please enter your" LOGINNAME & "*"

# Send <enter> to a single prompt.
SetAutoTrigger SHOWLOG "Show today's log?" "*"

Clone this wiki locally