Script function
world.GetTriggerOption
Read about scripting
Type
Method
Summary
Gets the value of a named trigger option
Prototype
VARIANT GetTriggerOption(BSTR TriggerName, BSTR OptionName);
View list of data type meanings
Description
Gets the current value of a trigger option.
You must specify the name of an existing trigger, and a trigger option from the list below. These are the same names as used in the XML world files for trigger options.
The return type is Variant, so the returned value will be the appropriate type for the data (ie. string or number (long)).
If the option name is not known, or is not allowed to be retrieved, a NULL variant is returned.
If the named trigger does not exist, EMPTY is returned. If the name given is invalid, NULL is returned. If the option name is not known, EMPTY is returned. (Use "IsEmpty" and "IsNull" to test for these possibilities).
For a detailed description about the meanings of the fields, see AddTrigger.
If GetTriggerOption is called from within a plugin, the triggers for the current plugin are used, not the "global" MUSHclient triggers.
OPTION NAMES
"clipboard_arg" - which wildcard to copy to clipboard
"colour_change_type" - whether trigger changes text (1), background (2), or both (0)
"custom_colour" - custom colour number to display
"enabled" - enabled flag
"expand_variables" - expand variables flag
"group" - group name
"ignore_case" - ignore case flag
"keep_evaluating" - keep evaluating flag
"lines_to_match" - how many lines to match for multi-line trigger
"lowercase_wildcard" - force wildcards to lowercase flag
"match" - what to match on
"match_style" - the style to match on
"multi_line" - multi-line trigger flag
"new_style" - the new style
"omit_from_log" - omit from log file flag
"omit_from_output" - omit from output flag
"one_shot" - one shot flag
"other_back_colour" - colour to set background if "custom_colour" is 17 (RGB colour number)
"other_text_colour" - colour to set text if "custom_colour" is 17 (RGB colour number)
"regexp" - regular expression flag
"repeat" - repeat on same line flag
"script" - script routine to call
"send" - what to send
"send_to" - where to send it - see GetTriggerInfo for values
"sequence" - sequence number
"sound" - sound to play
"sound_if_inactive" - play sound if world is inactive flag
"user" - user value (for scripting)
"variable" - variable to set
VBscript example
world.note world.GetTriggerOption ("mytrigger", "match")
Jscript example
world.note (world.GetTriggerOption ("mytrigger", "match"));
PerlScript example
$world->note ($world->GetTriggerOption ("mytrigger", "match"));
Python example
world.note (world.GetTriggerOption ("mytrigger", "match"))
Lua example
Note (GetTriggerOption ("mytrigger", "match"))
Lua notes
Lua returns nil where applicable instead of an "empty variant" or "null variant".
Return value
As described above.
See Also ...
Topics
Aliases
Default triggers/aliases/timers/macros/colours
Getting started
Groups
Plugins
Regular Expressions
Timers
Triggers
Functions
AddTrigger (Adds a trigger)
AddTriggerEx (Adds a trigger - extended arguments)
DeleteTemporaryTriggers (Deletes all temporary triggers)
DeleteTrigger (Deletes a trigger)
DeleteTriggerGroup (Deletes a group of triggers)
EnableTrigger (Enables or disables a trigger)
EnableTriggerGroup (Enables/disables a group of triggers)
GetPluginTriggerInfo (Gets details about a named trigger for a specified plugin)
GetPluginTriggerList (Gets the list of triggers in a specified plugin)
GetTrigger (Gets details about a named trigger)
GetTriggerInfo (Gets details about a named trigger)
GetTriggerList (Gets the list of triggers)
GetTriggerWildcard (Returns the contents of the specified wildcard for the named trigger)
IsTrigger (Tests to see if a trigger exists)
SetTriggerOption (Sets the value of a named trigger option)
(Help topic: function=GetTriggerOption)
Documentation contents page
|