WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Placing macros on action slots with Lua (https://www.wowinterface.com/forums/showthread.php?t=57350)

oddnecessity 08-14-19 03:21 AM

Placing macros on action slots with Lua
 
Hi,
I am using the following code in my addon to place spells on specific action slots:
Code:

PickupSpell("100") PlaceAction ("9") ClearCursor()
which works fine. What does not work is:
Code:

PickupMacro("ui off") PlaceAction ("59") ClearCursor()
PickupMacro("ui off") by itself works as intended (I have unique macro names)
ClearCursor() also works.
But PlaceAction seems to only work for spells, not for macros. Is this the intended behaviour? Am I missing something? How can I place macros on my action slots with Lua (I know it only works out of combat)

Xrystal 08-14-19 07:45 AM

I suspect the PlaceAction function will only work with a spell or ability id as Action is usually used to signify a combat/defense action made and thus not with Macros which can be made up of multiple actions.

I've never had the need to do this programmatically so can't comment on whether this has always been the case but function name wise it makes sense to not work with macros.

Hopefully someone else with more experience of this stuff will have a better explanation/answer for you.


All times are GMT -6. The time now is 10:06 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI