Quantcast WoWInterface - View Single Post - Using addon in a macro
View Single Post
11-15-12, 02:06 AM   #8
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,616
If this is your macro:
/mrc [btn:1] ground
/mrc [btn:2] flying
/mrc [btn:3] repair
/mrc [mod:shift, btn:1] funny
Then the two lines highlighted in yellow will both run when you left-click. This is expected. Each slash command is separate, and calls its handler function separately, so the condition provided with each is evaluated independently of any other slash commands the macro may be calling before or after the current one.

If you want everything to be evaluated at the same time, you need to change it to only one slash command, so that all of the arguments are passed to the handler function at the same time:
/mrc [btn:2] flying; [btn:3] repair; [mod:shift] funny; ground
This is just like writing a "real" macro. If you wrote this "real" macro:
/cancelaura [btn:1] Lightning Shield
/cast [btn:1, mod:shift] Lightning Shield
... and left-clicked it, both lines would run, so you would cancel Lightning Shield and then immediately recast it.
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote