Syntax: #MXPTRIG id {pattern} {commands} class options
Related: #TRIGGER

Creates an MXP trigger. Pattern is the MXP tag name (along with optional MXP arguments) to match. Normally, the trigger fires on closing tag, and in this form %0 can be used to reference text between the opening and closing tags. If the Options "Prompt|NoCr" are given, the trigger fires on the initial use of the MXP tag and the user can use the values stored in the %mxp record to modify the tag arguments before they are acted upon by TeSSH.

Instead of %0, you can also retrieve the text between the opening and closing tags using the variable. The difference between %0 and is that will also contain any embedded tags.

In v2.0 or later, MXP Triggers will also fire on undefined tags, such as regular XML tags. MXP Triggers also support the <tag/> XML syntax.


#MXPTRIG {color red} {%mxp.fore=Blue} "" "Prompt|NoCr"
An example of a prompt MXP trigger. When the <COLOR RED> tag is received, the trigger fires, and the "Fore" argument of the tag is changed from "red" to "Blue". This remaps the MXP colors sent by the server. Only arguments of OPEN MXP tags can be changed.

Add comment

Login or register to post comments