Macro commands - Wowpedia, the World of Warcraft wiki.
As stated, macros can reduce the number of keybinds you need, which can help to keep all your abilities within reach on a class that has a lot of abilities, like a hunter. They can make use of conditions to be situational, like only firing off in combat or when your enemy is a certain class, which saves you more time and thought.
In World of Warcraft, is there an equivalent that you can use in a macro to 'Interact With Target' so that I can create a macro that interacts with specific NPCs with a single keypress?
One of the best places to get macro help is Macro Recorder in Excel. When you record a macro with Macro Recorder, Excel writes the underlying VBA for you. After recording, you can review the code; see what the recorder is doing, and then try to turn the code it creates into something more suited to your needs. Using the VBA Help files.
When you choose the Macro button on the Developer tab, it opens the Macros dialog box, which gives you access to VBA subroutines or macros that you can access from a particular document or application. The Visual Basic button opens the Visual Basic Editor, where you create and edit VBA code.
Macros in World of Warcraft can be very powerful and a useful way to optimize or save on keybinds. Classic uses the modern macro API which introduces a few new features while limiting some potentially abusive ways that they were used in the old 1.12 client. Therefore you will have to update most of your macros from vanilla.
Macros provide a convenient way to automate repetitive procedures you do frequently while writing code. You can record, edit and play back macros, assign a shortcut to them, and share them. Macros can be used to combine a sequence of editor-related actions within a file.
As a note these macros are from 2007, depending on the version of WoW you are playing you may need to adjust which rank you are casting. Notes. NO macro can check for: BUFFS, DEBUFFS, or COOLDOWNS; NO macro can check for: HEALTH, MANA, RAGE, ENERGY, or COMBO POINTS; Any failed cast attempt stops the macro from casting any further spells.