Maybe this could help in your listed project (macros)?
http://www.wowwiki.com/Making_a_macro
I'd also recommend the book
http://www.amazon.com/World-Warcraft.../dp/0470229810
Hope this helps. Also, there's an online reference for the book I linked.
http://wowprogramming.com/