View Single Post
Unread 11-15-12, 02:06 AM   #8
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,591
If this is your macro:
Code:
/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:
Code:
/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:
Code:
/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, ShieldsUp, 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!
Phanx is offline   Reply With Quote