WoW:API PickupMacro: Difference between revisions
Jump to navigation
Jump to search
({{protectedcombatapi|2.2}}) |
m (Move page script moved page API PickupMacro to API PickupMacro without leaving a redirect) |
||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
Pick up a macro from the macro frame and place it on the cursor | Pick up a macro from the macro frame and place it on the cursor | ||
PickupMacro(macroID) | PickupMacro("macroName" or macroID) | ||
== Arguments == | == 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. | ||
:;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. Note that this index may change as macros are added or deleted. | |||
== Example == | == Example == | ||
PickupMacro(25) | PickupMacro("Reload") | ||
PickupMacro(25) | |||
===Result=== | ===Result=== | ||
:The macro named "Reload" is placed on the cursor. If there is no such named macro then nothing happens. | |||
:The macro located on the second page of the macro frame, middle row, far left will be placed on the mouse cursor and can be dropped onto any action button. If this position is empty (no macro in that slot defined), nothing happens. | :The macro located on the second page of the macro frame, middle row, far left will be placed on the mouse cursor and can be dropped onto any action button. If this position is empty (no macro in that slot defined), nothing happens. | ||
== | ==Note== | ||
Currently a macroID argument which is greater than 36 returns nothing. There are only 36 macro slots as of 3.0.3. |
Latest revision as of 04:47, 15 August 2023
← WoW API < PickupMacro
This function is protected, and cannot be called from insecure code while in in combat.
|
Pick up a macro from the macro frame and place it on the cursor
PickupMacro("macroName" or macroID)
Arguments[edit]
- macroName
- String - the name of the macro.
- 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. Note that this index may change as macros are added or deleted.
Example[edit]
PickupMacro("Reload") PickupMacro(25)
Result[edit]
- The macro named "Reload" is placed on the cursor. If there is no such named macro then nothing happens.
- The macro located on the second page of the macro frame, middle row, far left will be placed on the mouse cursor and can be dropped onto any action button. If this position is empty (no macro in that slot defined), nothing happens.
Note[edit]
Currently a macroID argument which is greater than 36 returns nothing. There are only 36 macro slots as of 3.0.3.