world.GetPluginTriggerOption

MUSHclient script function (Method) — introduced in version 4.21

Gets the value of a named trigger option for a specified plugin

Prototype

VARIANT GetPluginTriggerOption(BSTR PluginID, BSTR TriggerName, BSTR OptionName);

Data type meanings

Description

Gets the current value of a trigger option for the specified plugin.

You must specify a plugin ID, the name of an existing trigger, and a trigger option from the list given under the description for GetTriggerOption. These are the same names as used in the XML world files for trigger options.

If you want to find the value of an trigger option in the current plugin, use "GetTriggerOption".

If you are writing a plugin and want to find "global" MUSHclient trigger values, use an empty plugin ID, eg.

world.Note world.GetPluginTriggerOption ("", "my_trigger", "enabled")

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).

See GetTriggerOption for a list of option names and values.

VBscript example

Note GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled")

Jscript example

Note (GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled"));

PerlScript example

/$world->Note ($world->GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled"));

Python example

world.Note(world.GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled"))

Lua example

Note (GetPluginTriggerOption ("c8efc9f9e1edd118c6f2dbf5", "my_trigger", "enabled"))

Lua notes

Lua returns nil where applicable instead of an "empty variant" or "null variant".

Return value

As described above.

Related topic

Timers

See also

FunctionDescription
AddTriggerAdds a trigger
DeleteTriggerDeletes a trigger
GetPluginTriggerListGets the list of triggers in a specified plugin
GetTriggerInfoGets details about a named trigger
GetTriggerListGets the list of triggers
GetTriggerOptionGets the value of a named trigger option