WoW:API GetMacroInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Using ''local'' as a variable name is bad mojo. Plus, some copy-n-paste errors.)
m (Move page script moved page API GetMacroInfo to API GetMacroInfo without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
Return information about a macro.
name, iconTexture, body, isLocal = GetMacroInfo("name" or macroSlot);


Return information for a macro.
name, iconTexture, body, localStore = GetMacroInfo(''name'' or MacroID)
== Arguments ==
== Arguments ==
:(''name'' or MacroID)
;name : String - Name of the macro to query.
 
OR
:;''name'' or MacroID: Number/String - The ID number or name of the macro to query.
;macroSlot: Number - Macro slot ID to query. Slots 1 through 36 are general macros; 37 through 54 are per-character macros.


== Returns ==
== Returns ==
 
;name : String - The name of the macro.
:;name, iconTexture, body, localStore
;iconTexture : String - Path to the icon texture currently displayed for the macro.
 
;body : String - Macro contents.
;''name''
;isLocal : Flag - unknown.
:The name of the macro
 
;''iconTexture''
:The icon texture path of the macro
 
;''body''
:The contents of the macro
 
;''localStore''
:unknown; apears to be the numeric value 1 or nil.
== Example ==
local name, texture, macrobody, localVar = GetMacroInfo(1)
 
 
 
----
__NOTOC__

Latest revision as of 04:46, 15 August 2023

WoW API < GetMacroInfo

Return information about a macro.

name, iconTexture, body, isLocal = GetMacroInfo("name" or macroSlot);

Arguments[edit]

name
String - Name of the macro to query.

OR

macroSlot
Number - Macro slot ID to query. Slots 1 through 36 are general macros; 37 through 54 are per-character macros.

Returns[edit]

name
String - The name of the macro.
iconTexture
String - Path to the icon texture currently displayed for the macro.
body
String - Macro contents.
isLocal
Flag - unknown.