WoW API: EditMacro
Jump to navigation
Jump to search
Edit macro command/button.
EditMacro(index, name, icon, body, local, perCharacter)
This function may only be called when out of combat.
Arguments
- (index, name, icon, body, local, perCharacter)
- index
- Numeric - Macro index number. Provided by GetMacroIndexByName().
- name
- String - The name of the macro to be displayed in the UI. The current UI imposes a 16-character limit.
- icon
- Numeric - A 1-based iconTextureId (index of icon textures as displayed in "Change Name/Icon" UI). Check the current number if icon textures available by calling GetNumMacroIcons().
- body
- String - The macro commands to be executed. If this string is longer than 255 characters, only the first 255 will be saved.
- local
- Numeric - Purpose unknown, always 1.
- perCharacter
- Numeric - 0 "per account" macro, 1 "per character"
Returns
- macroId
- Numeric - The 1-based index of the macro, as displayed in the "Create Macros" UI. Same as argument "index".
Example
macroId = EditMacro(1, "MyMacro", 12, "/script CastSpellById(1);", 1, 1);