Parameters

All slash commands work the same way. You have a command, and a set of parameters. The parameters depend on the command, and some commands don't take any. Here are a few examples:

/cast Smite
___/ ___/
| |
| parameters
|
command

/petattack
________/ /
| parameters (empty)
|
|
command

/castsequence reset=target Immolate, Corruption, Curse of Agony, Siphon Life
___________/ ____________________________________________________________/
| |
command parameters

Macro options allow you to choose a set of parameters based on a number of criteria. At the highest level, you have a set of criteria/parameter groups separated by semicolons. The semicolons can be seen as an "else" or an "else if." The criteria consist of zero or more sets of conditions. Each condition set is enclosed with square brackets. Here is an illustration of this basic syntax.

/command [conditions] [more conditions] parameters; [conditions] parameters
As you saw in the basic examples above, the command is evaluated from left to right. As soon as it finds a set of conditions that are true, it runs the command with the corresponding parameters. If there are no conditions in a clause, it will always be true. In fact, you can imagine a single-spell /cast command as a macro option with one clause that has no conditions. When the command does not have any conditions that are true, it will not execute at all.