WoW:API RunMacro: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Putting in Shadowed's "how to run macros today")
(changed this according to use in securetemplates.lua)
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
{{removedapi|(unknown, very early)|Use [[API RunScript|RunScript]] instead.}}


{{protectedapi|2.0.1|For alternatives, try [[API_SecureTemplates|Secure Templates]].}}


Running macros can be accomplished with two function calls:
Execute a macro from the macro frame.
local _, _, script, _ = GetMacroInfo( macroID );
 
RunScript( script );
== Parameters ==
=== Arguments ===
 
:;macroID : Number - the position of the macro in the macro frame. Starting at the top left macro with 1, counting from left to right and top to bottom. The IDs of the first page (all characters) range from 1-18, the second page 19-36.
:;macroName : String - the name of the macro as it is displayed in the macro frame
 
=== Returns ===
:; nil

Revision as of 11:41, 7 February 2007

WoW API < RunMacro


Execute a macro from the macro frame.

Parameters

Arguments

macroID
Number - the position of the macro in the macro frame. Starting at the top left macro with 1, counting from left to right and top to bottom. The IDs of the first page (all characters) range from 1-18, the second page 19-36.
macroName
String - the name of the macro as it is displayed in the macro frame

Returns

nil