Here is a great reference for scripting macros:

http://samanna.net/eq.general/commands.shtml