EnableTimerGroup
Script function

world.EnableTimerGroup

DOC_scripting Read about scripting

Type

Method

Summary

Enables/disables a group of timers

Prototype

long EnableTimerGroup(BSTR GroupName, BOOL Enabled);

DOC_data_types View list of data type meanings


Description

Triggers, aliases and timers can be placed in "groups" where a group is a bunch of related items. Groups have names, there is no restriction on the name of a group. Ungrouped items have blank (empty) names.

To enable an entire group of timers do this:

world.EnableTimerGroup "groupname", 1

To disable the entire group:

world.EnableTimerGroup "groupname", 0

For debugging purposes the function returns a count of the number of members in the group (not the number enabled, as some may already be enabled). eg.

dim mycount
mycount = world.EnableTimerGroup ("groupname", 1)

If you are using plugins only the members of the current plugin (if any) are affected. If the call is made outside a plugin only the members of the group that are not in a plugin are affected.



VBscript example

world.EnableTimerGroup "groupname", 1  ' enable the group
world.EnableTimerGroup "groupname", 0  ' disable the group



Jscript example

world.EnableTimerGroup ("groupname", 1);  // enable the group
world.EnableTimerGroup ("groupname", 0);  // disable the group



PerlScript example

$world->EnableTimerGroup ("groupname", 1);  # enable the group
$world->EnableTimerGroup ("groupname", 0);  # disable the group



Python example

world.EnableTimerGroup ("groupname", 1)  # enable the group
world.EnableTimerGroup ("groupname", 0)  # disable the group



Lua example

EnableTimerGroup ("groupname", true)  -- enable the group
EnableTimerGroup ("groupname", false)  -- disable the group



Lua notes

The enabled flag is optional, and defaults to true.



Return value

A count of the number of items in that group.




See Also ...

Topics

DOC_aliases Aliases
DOC_defaults Default triggers/aliases/timers/macros/colours
DOC_starting Getting started
DOC_group Groups
DOC_plugins Plugins
DOC_timers Timers
DOC_triggers Triggers

Functions

FNC_AddTimer AddTimer (Adds a timer)
FNC_DeleteGroup DeleteGroup (Deletes a group of triggers, aliases and timers)
FNC_DeleteTemporaryTimers DeleteTemporaryTimers (Deletes all temporary timers)
FNC_DeleteTimer DeleteTimer (Deletes a timer)
FNC_DeleteTimerGroup DeleteTimerGroup (Deletes a group of timers)
FNC_DoAfter DoAfter (Adds a one-shot, temporary timer - simplified interface)
FNC_DoAfterSpecial DoAfterSpecial (Adds a one-shot, temporary, timer to carry out some special action)
FNC_DoAfterSpeedWalk DoAfterSpeedWalk (Adds a one-shot, temporary speedwalk timer - simplified interface)
FNC_EnableAliasGroup EnableAliasGroup (Enables/disables a group of aliases)
FNC_EnableGroup EnableGroup (Enables/disables a group of triggers, aliases and timers)
FNC_EnableTimer EnableTimer (Enables or disables an timer)
FNC_EnableTriggerGroup EnableTriggerGroup (Enables/disables a group of triggers)
FNC_GetTimer GetTimer (Gets details about a timer)
FNC_GetTimerInfo GetTimerInfo (Gets details about a timer)
FNC_GetTimerList GetTimerList (Gets the list of timers)
FNC_GetTimerOption GetTimerOption (Gets the value of a named timer option)
FNC_IsTimer IsTimer (Tests to see if a timer exists)
FNC_ResetTimer ResetTimer (Resets a named timer)
FNC_ResetTimers ResetTimers (Resets all timers)
FNC_SetTimerOption SetTimerOption (Sets the value of a named timer option)

(Help topic: function=EnableTimerGroup)

DOC_contents Documentation contents page