Every /macro command, explained

The whole slash-command surface of the macro system, grouped by job. One line each, copyable examples.

Casting

  • /cast <spell>: the workhorse. Casts a spell, remembering rank inside the name if you want an older rank.
    /cast [@mouseover,help,nodead] Purify
  • /castsequence <a>, <b>, <c>: steps through the list, one entry per press, resetting on your chosen condition.
    /castsequence reset=target Shadow Word: Pain, Vampiric Touch
  • /castrandom <a>, <b>: casts a random entry. Mostly used for cosmetic lines (random mount, random emote). Rare in serious macro writing for a reason: randomness is rarely what a rotation wants.

Targeting

  • /targetenemy: targets the nearest enemy; press again to cycle to the next one up. The foundation of tab-free play.
  • /targetlasttarget: returns to your previous target. The healer's friend: damage, heal, damage.
  • /focus: sets your focus target (your second, persistent "marked" target). /clearfocus drops it.
  • /assist: targets whatever your target is targeting. The classic raid-leader assist bind.
  • /startattack / /stopattack: starts or stops auto-attack without touching anything else. The "include in every damage macro" command, so your auto-attack keeps swinging even when a spell fails.

Full targeting patterns (focus fans, mouseover, last-target weaving) live on thetargeting macros page.

Pets

The pet commands, for hunters and warlocks:

  • /petattack: sends your pet at your target (or your focus). The backbone of the pet macros on this site.
  • /petfollow / /petstay: the leash commands. Bring the pet along, or park it.
  • /petpassive / /petdefensive: the two pet stances. Passive pets never initiate; defensive pets attack whatever you attack. (The old aggressive stance, and its command, are gone.)
  • /petdismiss: dismisses the pet. The feign-death-friendly eject key.
  • Summoning is a spell, not a command. /petsummon does not exist: hunters raise the pet with /cast Call Pet, warlocks with their demon summon. Battle pets use /summonpet.

Items and equipment

  • /use: uses a trinket, potion, racial, or any item on a target. Takes conditionals like /cast.
    /use [harm] Goblin Rocket Pack
  • /equip <item>: equips an item by name and remembers the slot.
    /equip [button:2] Shield of the Lost; [button:1] Worldcarver
  • /equipset <set name>: swaps an entire equipment-manager set. One button, full gear swap.

Action bars

  • /changeactionbar <n> / /swapactionbar <n>: swap which bar is active. Powershift bar tricks, druid forms, and stance pages live here.
  • /click <frame>: clicks any visible button, including addon-created frames. The hidden engine behind many "one button does everything" macros.

Control

  • /stopcasting: interrupts your current cast. The interrupt-enabler on every interrupt macro on this site.
  • /stopmacro: stops the macro right there, used inside conditionals. /stopmacro [combat] is the classic "never do this in combat" guard.
  • /cancelaura <name>: drops a buff or channel by name. Dance-to-kill-swing macros, old-style heroic presence cleanses.
  • /cancelform: drops a druid form or shaman ghost wolf.
  • /dismount: dismounts you. Bind it to a key, always.

Macro editor and scripting

  • /macro: opens the macro window. /macroiconsets the macro's icon from the chat line. Names like /macrotext that show up in old guides are addon attributes, not client commands.
  • /run / /script: executes Lua. The everything-command in old guides, now combat-restricted for security. See the FAQ.
  • /reload: reloads the UI. Not a macro command per se, but it rescues more broken bars than any spell.

How to use this page

Bookmark it, then build a macro from the guide. When a technique page mentions a command in passing, this is the page it links to. The list is stable client infrastructure: if you learned it in warlords, it still works today.

Questions people ask

Which commands accept conditionals?+
The action commands take the full condition language: /cast, /castsequence, /castrandom, /use, /stopcasting, /startattack, /stopattack, /cancelaura, /cancelform, /dismount. Targeting commands accept a narrower slice (modifier gates like [mod:shift] and [button:2]) but not full state conditions like [harm]. That is why focus and mouseover patterns put the state gate on a /cast line, with the targeting command doing the aiming.
Why does /run not work in combat?+
The scripting commands (/run, /script) are restricted for security; the client disables most of their functionality in combat. Anything in your macro after a /run line in combat simply will not happen. Keep scripts out of combat macros.
Can macros click addon buttons?+
/click works on any button your client can see, including addon-created buttons, which is how a lot of famous addon-macro hybrids work. Be aware modern addon frameworks and addon restrictions deliberately break some of these tricks.