Wikia

WoWWiki

API GetMacroIndexByName

Talk0
101,310pages on
this wiki
Revision as of 02:59, December 14, 2008 by Hypehuman (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
WoW API < GetMacroIndexByName

Return macro index for a given name.

macroIndex = GetMacroIndexByName("name")

Arguments Edit

"name" 
String - The name of a macro as obtainable by GetActionText(slot)

Returns Edit

macroIndex 
The numeric index of the macro or 0 if there's no macro with the given name.

Notes Edit

Macros are indexed 1-36 for "global" macros and 37-54 for character-specific macros.
If there is two or more macros with the same name, it appears to return the highest macroIndex found.

Example Edit

local macroIndex = GetMacroIndexByName("Fred")
if macroIndex == 0 then
  -- You have no macro named "Fred"
end



Around Wikia's network

Random Wiki