The macro's are essentially parsed line by line. Just like you execute the commands in your chat bar.
When looking at the following example:
Code: Register to unlock hidden link
name: simpleLoop
/echo Start
/pause 1
/echo One second
/pause 1
/echo Two seconds
/pause 1
/echo Three seconds
/echo Restarting...
/m simpleLoop
You see two commands recurring, /pause and /echo. Try typing "/echo test", without the "s, in your chat bar. You'll see test appear in your chat. Now try running the macro. Remember to type /dump to stop it again.
If you want to make a barking macro, you'd use
Code: Register to unlock hidden link
Name: Barking
/yell YOUR MESSAGE
/pause 120
/m Barking
to repeat the /yell YOUR MESSAGE every two minutes (60 seconds in a minute, 60*2 is two minutes)
If you would want to make a macro that presses button on your toolbar, there is one essential command:
Code: Register to unlock hidden link
/ui action toolbarSlotXX
Replace the XX with toolbar button you wish to press, beginning with 00 adding upwards.
Button 1 would be 00. Button 2 would be 01. Etcetera.
For anything else, use your imagination! It are simple command chains, you can use any in-game command in a macro.
Hope to have helped.