See the link above.
To set up a macro, go to the System menu. There is an option for User Macros.
Having a keyboard really helps. Each command goes on a separate line. You are limited to 15 lines per macro. Macros cannot call other macros. Use /micon "action name" to show the cool down for that action.