This is one of the most powerful features of TeSSH. It allows you to define a command to be executed whenever the matching text is received from the server.
If the id is present, then the trigger is created with the given short name. Otherwise the name for the trigger is the same as the pattern. IDs are useful for giving short names to complicated trigger patterns, or for creating multiple triggers with the same pattern.
The pattern is the text to be matched. This pattern should always be enclosed in braces {}. The pattern indicates the text received from the server which causes this trigger to execute (or fire). This pattern can contain special pattern matching symbols and wildcards.
The commands are executed when the pattern is received from the server.
The classname is optional, and is the name of the class folder that this action is part of. Triggers can be enabled and disabled when part of a class. If the classname is not given, the current default class is used.
The options are optional, and are used to set various trigger properties. Options is a string list of values. Allowed values are:
For setting advanced trigger options, you normally go to the Package Editor dialog. In this screen, you can determine whether the action is triggered at the end of each line received from the server, or if it is just triggered at the end of receiving a block of data from the server. Responding to server prompts such as Username and Password require a trigger that activates after a block of text is received since these prompts are not normally followed by a newline.
See the Pattern Matching section for more detailed information on patterns.
More information on trigger options and trigger types is available here.
More information on multistate triggers (triggers with sequentially-checked patterns) is available here.
A simple trigger action
Add comment