Macroception
MACROCEPTION!!!
WHAT DOES IT DO?
Macroception allows you to call a macro from within another macro by its name.
Currently only default UI macros can be called.
Support for different custom macro AddOns is planned, though! I mean, maybe.
HOW DO I USE IT?
/click m macroName:mouseButton
- macroName
- The name of the macro to call. If this is a number, it will call the macro by its ID instead
(which is not recommended as these tend to change, I think?). - mouseButton
- (optional) Simulates this button in the macro (for [btn] conditional). If omitted, defaults to LeftButton.
- The [btn:X] conditional works with numbers up to 31, The button names for these numbers are (in order): LeftButton, RightButton, MiddleButton, Button4, Button5, ..., Button31
- You can also just give a number between 1-31 and it'll be converted to the correct button name.
- If a non-mousebutton string is supplied, [btn:string] will evaluate true,
- e.g.: "/click m myMacro:Heyooo" would call myMacro where any [btn:Heyooo] conditionals would be true
Important
There may not be any space characters in the arguments. If there are spaces in your macro names, remove them. (Or, alternatively, you can specify a substitute character for space by editing... THE SOURCE.)
Examples
- # Call macroA with left click:
- /click m macroA
- /click m macroA:LeftButton
- /click m macroA:1
- # Call macroB with middle click:
- /click m macroB:MiddleButton
- /click m macroB:3
Running multiple macros at once
You can run multiple macros simply by separating them with a comma.
- # Call macroA, macroB, macroC, macroD (in this order):
- /click m macroA,macroB,macroC,macroD
- # ... equivalent to:
- /click m macroA
- /click m macroB
- /click m macroC
- /click m macroD
Chaining?
It is not possible for a button to click itself, or any other button previously found in the "click stack"
(i.e., you can not press a button that is already being held down).
This is a restriction (or safety feature :P) by Blizzard to prevent infinite loops from happening.
For this reason, the following won't work when using MacroA:
- MacroA:
- /click m MacroB
- MacroB:
- /click m MacroC
- MacroC:
- /click m MacroD
- MacroD:
- /say Yay!
... because when MacroB is trying to call MacroC, the button 'm' has already been clicked (or rather, it's currently BEING clicked) by A and so it cannot be clicked again. The execution stops there.
To alleviate this a bit, Macroception will provide a number of additional macro buttons (9 by default!)
that can be used when you need to do chaining. The buttons are named m1, m2, m3, m4... m9.
To make the above example work:
- MacroA:
- /click m MacroB
- MacroB:
- /click m1 MacroC
- MacroC:
- /click m2 MacroD
- MacroD:
- /say Yay!
Configuration?
Well, there's not much to configure. I chose not to unnecessarily bloat the AddOn by adding a GUI or stuff like that.
You can adjust some settings in the source itself, like the name of the button, delimiter characters and the number of extra buttons. (found at the very top of core.lua)
Comments