world.DeleteAlias
Deletes an alias
Prototype
long DeleteAlias(BSTR AliasName);
Description
Deletes the named alias from the list of aliases.
WARNING - if the alias is executing a script it cannot be deleted. For example, an alias cannot delete itself.
If you need to delete an alias from within itself use DoAfterSpecial to delete it after a short delay. You might also want to use EnableGroup to disable it first.
VBscript example
world.DeleteAlias "my_alias"
Jscript example
world.DeleteAlias("my_alias");
PerlScript example
$world->DeleteAlias("my_alias");
Python example
world.DeleteAlias("my_alias")
Lua example
DeleteAlias("my_alias")
Return value
eInvalidObjectLabel: The alias name is not valid
eAliasNotFound: The named alias does not exist
eItemInUse: Cannot delete trigger/alias/timer because it is executing a script
eOK: deleted OK
Related topic
See also
| Function | Description |
|---|---|
| AddAlias | Adds an alias |
| DeleteAliasGroup | Deletes a group of aliases |
| DoAfterSpecial | Adds a one-shot, temporary, timer to carry out some special action |
| EnableAlias | Enables or disables an alias |
| GetAlias | Gets details about an alias |
| GetAliasInfo | Gets details about an alias |
| GetAliasList | Gets the list of aliases |
| IsAlias | Tests to see if an alias exists |