Utilizing /click to run concurrent castsequences has an explanation on how to write /click macros.