Shred or Mangle macro for PvP

I’m wondering if it’s possible to have one button do shred or mangle depending on where your at?
/cast shred
/cast mangle
^^^Does not work^^^
In PVP there is always lag for me in there and it might look like im behind the target but some times im not and wast valuable time with nothing happening, and i end up finding my self just using mangle and not using shred, and it s a substantial DPS loss on bleeding targets.
Thanks for any help in advance!!

Sounds like a different macro topic question. I will be splitting into a new topic.

Try the following and see if it works:

/castsequence reset=0.3 Shred
/cast Mangle

Basically that will try to hit one or the other but you can not specify to do an ability when X or Y reason, I wish we could.

that does not work either, thanks for the help tho.