Macro Intro & FAQ - READ 1ST!

by Cogwheel | 17/04/2007 22:56:48

Cogwheel

This post serves two similar purposes. First and foremost, it is an introduction to the concepts behind macros and should help you build a foundation for creating your own. Second, it is an FAQ that hopefully will answer a lot of the questions people post day after day. If you don't see an answer in the FAQ sections, try looking through a relevant section in the guide (CTRL-F is your friend).

Table of Contents
  • What is a macro?
  • How do I make a macro?
  • So, what good is a macro, then?
  • Notes about casting
    • Spell names and ranks
    • Global cooldown (or: Multiple actions with one click)
  • How do I use an item/trinket?
  • Targeting
    • /target
    • Other targeting commands
  • What is "focus"?
  • How do I control my pet?
  • Can I specify which spell to use for button feedback? (#show)
  • Other slash commands
    • Equipping items
    • Sequencing spells
    • Random spells
    • Attacking
    • Action bar manipulation
    • Removing buffs
    • Stopping a cast
    • Halting a macro early
    • Dismounting
    • Simulating button clicks
  • Advanced Scripting
    • What scripts can't do
    • So, what is a script?
  • Frequently Requested Macros
    • Cast a spell directly on yourself or someone else
    • Swap main hand with off-hand
    • Random mount
    • Pick flying or normal mount depending on continent
    • Quicker Druid form switch
    • Set a raid icon (lucky charm) on someone
    • Whisper your target (or another unit)
  • Miscellaneous FAQs
    • Can I put a "wait" in a macro?
    • How do I cast a spell if _______?
    • How do I keep my macros on more than one computer?
    • How do I make a macro that does X when Y happens?
    • Is there any way to make a macro run automatically?
    • Can macros use custom icons?
    • How do I target a particular raid icon (lucky charm)?
    • Why doesn't my [modifier:shift] macro work?


What is a Macro?

A macro is simply a list of slash commands. I'm sure you are familiar with some of the more common slash commands:
  • /say (/s)
  • /whisper (/w, /talk, /t)
  • /emote (/e, /em, /me)
  • /dance
  • Oh, and for you PvPers out there, I mustn't forget /spit


With macros, not only can we issue commands like these from action buttons, but we can also use many of them at once. Each unique command goes on its own line and is written exactly as you would type it in the chat box. For instance, if you wanted a macro that yelled "Everybody, dance now!" and burst you into dance, you would write it thus:

/y Everybody, dance now!
/dance


A mostly complete list of slash commands is available at http://www.wowwiki.com/Slash_command though at the time of this writing some of the new commands in 2.0 haven't been added (see also Iriel's 2.0 Changes sticky). WoWWiki is a great source of additional information for macros, especially scripts created with /run (the /run command will be covered later on).

Note: I will take this early opportunity to let you know that macros run all at once. This means that when you click the button, the macro runs each command from start to finish before returning control to the game. This has two important effects. First, if you write a macro that takes a long time to execute (like /run for i=1, 100000000 do end), the game will freeze for as long as it takes to run the macro. Second, and arguably more important, there is no way to wait in a macro without freezing the game. This fact will become much more apparent when we start dealing with the /cast command and its ilk. See the Miscellaneous FAQs below for more information (including an exception to the wait rule).

How do I make a macro?

First, open up the macro window. You can do this either by opening the main menu and selecting Macros, or by typing /macro (/m) in the chat box. At the top of the window, you'll see two tabs: General Macros and Yourname Specific Macros. General macros are stored on an account-by-account basis and are shared by all your characters. Character specific macros are, well, I think you can figure this one out yourself. :P Immediately under the tabs is a grid of 18 boxes where the macros are displayed. Under those, there is a single box which displays your currently-selected macro with a Change Name/Icon button next to it. Below that is the edit box where you actually type the macro. Finally, at the bottom you have a number of self-explanatory buttons.

To create a macro, click the New button at the bottom of the window. This brings up another small window off to the side where you choose the icon and type a name for the macro. Once you have chosen an icon and a name, click the Okay button.

[ Post edited by Cogwheel ]


See my mods at http://cogwheel.wowinterface.com

I'd rather teach a man to fish.

http://www.catb.org/~esr/faqs/smart-questions.html#before

by Slouken | 10/05/2007 02:02:16

Slouken

That's fixed for 2.1.0, btw.

Bump! Recently Bumped Threads

 

Blizzard Announcement Recent Blizzard Announcements

 

We suggest