Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:API EditMacro
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} Edit macro command/button. EditMacro(index or macroName, name, icon, body, local, perCharacter) This function may only be called when out of combat. == Arguments == :(index or macroName, name, icon, body, local, perCharacter) ; index or macroName : Number or string - the index or name of the macro to be edited. Index ranges from 1 to 36 for account wide macros and 37 to 54 for character specific. ; name : String - The name of the macro to be displayed in the UI. The current UI imposes a 16-character limit. The name remains unchanged if nil. ; icon : Numeric - A 1-based iconTextureId (index of icon textures as displayed in "Change Name/Icon" UI). Check the current number of icon textures available by calling [[API GetNumMacroIcons|GetNumMacroIcons()]]. The icon remains unchanged if nil. ; 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 : Archaic. Now purposeless, since character and account macros are given unique IDs. == Returns == ; macroId : Numeric - The new index of the macro, as displayed in the "Create Macros" UI. Same as argument "index" unless the macro name is changed, as they are sorted alphabetically. == Example == macroId = EditMacro(1, "MyMacro", 12, "/script CastSpellById(1);", 1, 1); == Notes == *If this function is called from within the macro that is edited, the rest of the macro (from the final character's position of the /run command onward) will run the new version.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)