Six button presses to get 3 spells to fire. What am I doing wrong?

I just want two spells on the same button. First spell has a cooldown, it if is on cooldown when I hit the button, cast the second spell (has no cooldown)

Using Priority List

/cast Expel Harm
/cast Tiger Palm

Starting at the beginning of combat, here is what happens each time I press the button:
1: Expel Harm casts
2: Macro icon changes to Tiger Palm
3: Tiger Palm cast

Why do I have to press it 3 times to cast 2 spells?

4: nothing happens
5: Macro icon changes to Tiger Palm
6: Tiger Palm casts

So to cast Expel Harm > Tiger Palm > Tiger Palm it is taking 6 button presses.

What am I doing wrong?

Because no macro can know if the action will succeed or not. It can only attempt to do one GCD action per click and if that click doesn’t work it can’t just “try” the next one. Also the step function you choose will change how the macro executed and what it does the next time you click.

I see, I think. I thought the whole point of GSE was to do exactly this.

If spell 1 is on cooldown, cast spell 2

Yes and no.

Yes the point is to work around these kind of limits but you have to work around this within the rules of what Blizzard allows. Hence why a lot of people are “spamming” the macro and not individually clicking it.

GSE is a macro compiler that allows you to write extremely complicated macros that are not able to be written in the current macro interface. That’s it’s purpose.