Learning Macro Syntax and Limitations

@dukeofearl1711: “@TrainingDummies how can I learn the syntax and what limitations there are on macros?”

While all you need to know is Copy & Paste to Use a macro, sometimes you want to know what it is you’re doing and how it works.  To learn how to write your own may take some time.

Everyone learns a little differently, and at different levels. This could be easier or harder for you to learn based on if you have ever had any kind of scripting or programming background.  However, learning the syntax is pretty easy though, especially if you’re good at solving a “puzzle” with the answers given to you.  I’ll explain that in a bit.

To get started, I’d say give this a light reading:  http://www.wowwiki.com/Making_a_macro
The beginning of this will go over some fundamentals.
If you’re already familiar with this, skip down to the “Macro options” section.
Next, you’ll want to review the “Syntax overview” section.

Now, about that “puzzle” mentioned earlier.  If this is too much to absorb (there are many generic examples, and a few actual working examples) there’s another way you can learn how to do this.
http://www.macroexplain.com/ has the ability to decipher any working macro for you.  If you’ve found a macro that does something you like, but you’re unsure of how or why it works, Copy and paste that macro into MacroExplain’s macro box and then click “Explain This Macro”.  What you’ll get is the logical step by step breakdown of what the macro is trying to do, and what it will do or continue trying to do until it meets a condition that passes.

MacroExplain is also a very easy way to begin writing your own macros. Once you’re familiar enough with the basics you can use MacroExplain to check your syntax and also see if your macro will work or if it will break.  If it will break, it also explains to you why it will break (because of a global cooldown, typo, rule or some other limiting factor).  In this way, MacroExplain can be your cipher to understanding while writing your own macros.

With Mists of Pandaria and the MoP prepatch right around the corner there may be some changes that alter how some commands work, but there are definitely some spell’s functions that will be changing for all classes.  I am not sure how MacroExplain keeps itself up to date, so if it does not update with MoP, it may no longer correctly explain macros beyond that time.  If it does stay up to date, then it can still be a usefull tool to decipher a macro or an assistant for writing your own macros.