@ everyone in here using macros for this legendary -
Take a look at this thread:
Macros: Essential Information
Covers basic macro construction, conditionals, basic sequences, what macros can/can’t do, and a whole bunch more. Highly recommend you check it out.
There is also a thread on that subforum by @Elvenbane with a large number of sample macros for all classes to get you started if you don’t want to learn how to make your own (though you should, it’s very versatile and super easy).