How come this macro isn't working

#showtooltip Rampage
/cast [@mouseover, exists, harm, nodead] Heroic Throw
/cast [exists, harm, nodead] Heroic Throw
/cast [@mouseover,harm,nodead][]Rampage

So I would like to it Heroic Throw (8-30 yard range) when i am not in melee range, and Ramapge when i am in melee range.

Heroic Throw works fine but when i am at melee Rampage won’t cast.

Heroic Throw doesn’t have the same behavior as Charge in that it won’t skip if you’re out of range and go on to the next cast.

While this works

/cast Charge
/cast Rampage

This doesn’t

/cast Heroic Throw
/cast Rampage

If you’re in melee range it will say you’re too close and not cast Rampage.

Both those abilities are on the GCD. As soon as you try to trigger an ability that’s on the GCD, even if you’re unable to, it prevents you from using other GCD abilities.

Slap a modifier on it (alt in this example):

#showtooltip
/cast [mod:alt,@mouseover,harm,nodead] [mod:alt] Heroic Throw; [@mouseover,harm,nodead] [] Rampage

that is very refreshing. I was wondering why the same macro works for charge but not heroic throw.

Are there any other ranged ability that work the same as charge (skip to next cast if out of range)?

Charge is off the GCD which is why it works.