Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
This function is restricted.
|
Deletes a macro.
DeleteMacro(index or macroname)
Arguments[]
The sole argument has two forms to identify which macro to delete.
- index
- number - Index ranging from 1 to 120 for account-wide macros and 121 to 138 for character-specific ones.
- macroname
- string - Name of the macro to delete.
Example[]
Deleting all global macros:
-- Start at the end, and move backward to first position (1).
for i = 0 + select(1,GetNumMacros()), 1, -1 do
DeleteMacro(i)
end
Deleting all character-specific macros:
-- Start at the end, and move backward to first position (121).
for i = 120 + select(2,GetNumMacros()), 121, -1 do
DeleteMacro(i)
end
Patch changes[]
Patch 2.0.1 (2006-12-05): Protected during combat,[1] but now also accepts a macro's name as an argument.[2]
See also[]
- GetMacroInfo()
- EditMacro()
- PickupMacro()
References[]
- ^ Iriel 2006-10-23. 2.0 Changes - Concise List (New). Archived from the original
- ^ slouken 2006-10-19. Re: Expansion Changes - Concise List. Archived from the original