Script function
world.DeleteTrigger
Read about scripting
Type
Method
Summary
Deletes a trigger
Prototype
long DeleteTrigger(BSTR TriggerName);
View list of data type meanings
Description
Deletes the named trigger from the list of triggers.
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 EnableTrigger to disable it first.
VBscript example
world.DeleteTrigger "my_trigger"
Jscript example
world.DeleteTrigger("my_trigger");
PerlScript example
$world->DeleteTrigger("my_trigger");
Python example
world.DeleteTrigger("my_trigger")
Lua example
DeleteTrigger("my_trigger")
Return value
eInvalidObjectLabel: The trigger name is not valid
eTriggerNotFound: The named trigger does not exist
eItemInUse: The trigger is currently executing a script
eOK: deleted OK
View list of return code meanings
See Also ...
Topics
Aliases
Default triggers/aliases/timers/macros/colours
Getting started
Groups
Plugins
Regular Expressions
Timers
Triggers
Functions
(AddTrigger) Adds a trigger
(AddTriggerEx) Adds a trigger - extended arguments
(DeleteTemporaryTriggers) Deletes all temporary triggers
(DeleteTriggerGroup) Deletes a group of triggers
(DoAfterSpecial) Adds a one-shot, temporary, timer to carry out some special action
(EnableTrigger) Enables or disables a trigger
(EnableTriggerGroup) Enables/disables a group of triggers
(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=DeleteTrigger)