WoW:API EditMacro: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:


  EditMacro(index, name, icon, body, local, perCharacter)
  EditMacro(index, name, icon, body, local, perCharacter)
This function may only be called when out of combat.


== Arguments ==
== Arguments ==

Revision as of 14:32, 28 April 2008

WoW API < EditMacro

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

Notes