world.GetPluginTimerOption

MUSHclient script function (Method) — introduced in version 4.21

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

Prototype

VARIANT GetPluginTimerOption(BSTR PluginID, BSTR TimerName, BSTR OptionName);

Data type meanings

Description

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

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

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

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

world.Note world.GetPluginTimerOption ("", "my_timer", "enabled")

If the option name is not known, or is not allowed to be retrieved, a NULL variant is returned.

If the named timer 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 GetTimerOption for a list of option names and values.

VBscript example

Note GetPluginTimerOption("c8efc9f9e1edd118c6f2dbf5", "my_timer", "enabled")

Jscript example

Note (GetPluginTimerOption ("c8efc9f9e1edd118c6f2dbf5", "my_timer", "enabled"));

PerlScript example

/$world->Note ($world->GetPluginTimerOption ("c8efc9f9e1edd118c6f2dbf5", "my_timer", "enabled"));

Python example

world.Note(world.GetPluginTimerOption ("c8efc9f9e1edd118c6f2dbf5", "my_timer", "enabled"))

Lua example

Note (GetPluginTimerOption ("c8efc9f9e1edd118c6f2dbf5", "my_timer", "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
AddTimerAdds a timer
DeleteTimerDeletes a timer
GetPluginTimerListGets the list of timers in a specified plugin
GetTimerInfoGets details about a timer
GetTimerListGets the list of timers
GetTimerOptionGets the value of a named timer option