Read about scripting
Deletes a group of triggers
View list of data type meanings
long DeleteTriggerGroup(BSTR GroupName);
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 delete an entire group of triggers do this:
For debugging purposes the function returns a count of the number of members deleted. eg.
mycount = world.DeleteTriggerGroup ("groupname")
If you are using plugins only the members of the current plugin (if any) are deleted. If the call is made outside a plugin only the members of the group that are not in a plugin are deleted.
WARNING - if the trigger is executing a script it cannot be deleted. For example, a trigger cannot delete itself.
If you need to delete a trigger from within itself use DoAfterSpecial to delete it after a short delay. You might also want to use EnableTriggerGroup to disable it first.
Since DeleteTriggerGroup deletes multiple triggers, any found to be "in use" (that is, executing a script) will not be deleted.
Available in MUSHclient version 3.29 onwards.
A count of the number of items deleted.
See Also ...
(AddTrigger) Adds a trigger
(AddTriggerEx) Adds a trigger - extended arguments
(DeleteAliasGroup) Deletes a group of aliases
(DeleteGroup) Deletes a group of triggers, aliases and timers
(DeleteTemporaryTriggers) Deletes all temporary triggers
(DeleteTimerGroup) Deletes a group of timers
(DeleteTrigger) Deletes a trigger
(DoAfterSpecial) Adds a one-shot, temporary, timer to carry out some special action
(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
(EnableTriggerGroup) Enables/disables a group of triggers
(GetAliasInfo) Gets details about an alias
(GetPluginTriggerInfo) Gets details about a named trigger for a specified plugin
(GetPluginTriggerList) Gets the list of triggers in a specified plugin
(GetTimerInfo) Gets details about a timer
(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=DeleteTriggerGroup)