[Home] [Downloads] [Search] [Help/forum]

Register forum user name Search FAQ


Script function


Read about scripting




Enables/disables a group of triggers


long EnableTriggerGroup(BSTR GroupName, BOOL Enabled);

View list of data type meanings


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 triggers do this:

world.EnableTriggerGroup "groupname", 1

To disable the entire group:

world.EnableTriggerGroup "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.EnableTriggerGroup ("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.

Available in MUSHclient version 3.27 onwards.

VBscript example

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

Jscript example

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

PerlScript example

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

Python example

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

Lua example

EnableTriggerGroup ("groupname", true)  -- enable the group
EnableTriggerGroup ("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 ...


Default triggers/aliases/timers/macros/colours
Getting started
Regular Expressions


(AddTrigger) Adds a trigger
(AddTriggerEx) Adds a trigger - extended arguments
(DeleteGroup) Deletes a group of triggers, aliases and timers
(DeleteTemporaryTriggers) Deletes all temporary triggers
(DeleteTrigger) Deletes a trigger
(DeleteTriggerGroup) Deletes a group of triggers
(EnableAliasGroup) Enables/disables a group of aliases
(EnableGroup) Enables/disables a group of triggers, aliases and timers
(EnableTimerGroup) Enables/disables a group of timers
(EnableTrigger) Enables or disables a trigger
(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
(GetTriggerOption) Gets the value of a named trigger option
(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
(StopEvaluatingTriggers) Stops trigger evaluation

(Help topic: function=EnableTriggerGroup)

Documentation contents page

Search ...

Enter a search string to find matching documentation.

Search for:   

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]