DeleteTriggerGroup
Script function

world.DeleteTriggerGroup

DOC_scripting Read about scripting

Type

Method

Summary

Deletes a group of triggers

Prototype

long DeleteTriggerGroup(BSTR GroupName);

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 delete an entire group of triggers do this:

world.DeleteTriggerGroup "groupname"

For debugging purposes the function returns a count of the number of members deleted. eg.

dim mycount
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.



VBscript example

world.DeleteTriggerGroup "groupname"



Jscript example

world.DeleteTriggerGroup ("groupname");



PerlScript example

$world->DeleteTriggerGroup ("groupname");



Python example

world.DeleteTriggerGroup ("groupname")



Lua example

DeleteTriggerGroup ("groupname")



Return value

A count of the number of items deleted.




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_regexp Regular Expressions
DOC_timers Timers
DOC_triggers Triggers

Functions

FNC_AddTrigger AddTrigger (Adds a trigger)
FNC_AddTriggerEx AddTriggerEx (Adds a trigger - extended arguments)
FNC_DeleteAliasGroup DeleteAliasGroup (Deletes a group of aliases)
FNC_DeleteGroup DeleteGroup (Deletes a group of triggers, aliases and timers)
FNC_DeleteTemporaryTriggers DeleteTemporaryTriggers (Deletes all temporary triggers)
FNC_DeleteTimerGroup DeleteTimerGroup (Deletes a group of timers)
FNC_DeleteTrigger DeleteTrigger (Deletes a trigger)
FNC_DoAfterSpecial DoAfterSpecial (Adds a one-shot, temporary, timer to carry out some special action)
FNC_EnableAliasGroup EnableAliasGroup (Enables/disables a group of aliases)
FNC_EnableGroup EnableGroup (Enables/disables a group of triggers, aliases and timers)
FNC_EnableTimerGroup EnableTimerGroup (Enables/disables a group of timers)
FNC_EnableTrigger EnableTrigger (Enables or disables a trigger)
FNC_EnableTriggerGroup EnableTriggerGroup (Enables/disables a group of triggers)
FNC_GetAliasInfo GetAliasInfo (Gets details about an alias)
FNC_GetPluginTriggerInfo GetPluginTriggerInfo (Gets details about a named trigger for a specified plugin)
FNC_GetPluginTriggerList GetPluginTriggerList (Gets the list of triggers in a specified plugin)
FNC_GetTimerInfo GetTimerInfo (Gets details about a timer)
FNC_GetTrigger GetTrigger (Gets details about a named trigger)
FNC_GetTriggerInfo GetTriggerInfo (Gets details about a named trigger)
FNC_GetTriggerList GetTriggerList (Gets the list of triggers)
FNC_GetTriggerOption GetTriggerOption (Gets the value of a named trigger option)
FNC_GetTriggerWildcard GetTriggerWildcard (Returns the contents of the specified wildcard for the named trigger)
FNC_IsTrigger IsTrigger (Tests to see if a trigger exists)
FNC_SetTriggerOption SetTriggerOption (Sets the value of a named trigger option)

(Help topic: function=DeleteTriggerGroup)

DOC_contents Documentation contents page