Documentation

Triggers

Lua can directly create and interact with zScript triggers. Select a method in the list on the left for more information.

To return the pattern of a trigger, use the fullname property.

In addition to the common properties, a Trigger object has the following properties:

trigger
the same as the fullname property and used to store the full trigger pattern
waitcr
specifies whether to wait for a newline (true/false)
bothcr
specifies if this is a prompt trigger (true/false). Forgive the bad name...it's something left over from TeSSH
isalarm
true if this trigger is an alarm
isregex
determines if the pattern is a regular expression (true/false)
isexp
determines if the trigger is an expression trigger
iscommand
determines if the trigger is an oninput trigger
trigcolor
the color attribute value for matching the line color
verbatim
whether the trigger must match the pattern verbatim
iscolor
whether the trigger is an ANSI color trigger
exclusive
whether it should stop matching other triggers if this one fires
curcond
the current trigger state number
condkind
the type of the current trigger state

Add comment

Login or register to post comments