WoW:API EditMacro: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
 
No edit summary
Line 13: Line 13:
; 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 [[API GetNumMacroIcons|GetNumMacroIcons()]].
; 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 [[API GetNumMacroIcons|GetNumMacroIcons()]].


; body : String - The macro commands to be executed.
; 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.
; local : Numeric - Purpose unknown, always 1.

Revision as of 22:30, 14 July 2007

WoW API < EditMacro

Edit macro command/button.

EditMacro(index, name, icon, body, local, perCharacter)

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);

Notes