Edit: Devouring Plague Macro

Working on the SPriest again and I remember using a macro back in the day that would cast Devouring Plague if I was over 50 insanity and Shadow Word: Pain if I was under 50 insanity.

EDIT:
Okay what about this, I got it off Google, but can’t make it work:

/cast [target=target, if=debuff(“DotName”)] SpellA
/cast [target=target, if=not debuff(“DotName”)] SpellB

Basically i’m trying to tell it, if the target is dotted with SW:P I wanna hit it with DP. Is this even feasable now in game, working, or allowed? If it is allowed and does work, what would a proper version look like.

Is there still a way to do this? I can’t find it anywhere on the internet. Thank you kindly

There is not, no.