Modifier target of target macro

hello all,

I’m primarily healing, but sometimes I do want to cast something like SW:P on the tank’s target without having to physically change targets myself, and I’m trying to consolidate some macro space for when I’m soloing…long story short, I’m trying to make a macro that will cast Shadow Word Pain on button press, and Vampiric Embrace with modifier ctrl, ether when I’m targeting the tank or if I am manually targeting myself.

What I have so far simply does not work and I’m not sure why. I pulled a macro from retail (I am playing on classic server at the moment) which also does not fully work (and it maybe that I never noticed it didn’t work right before, the macro below is not the retail macro).

/cast [harm][@targettarget] Mind Flay;
/cast [mod:ctrl,harm][mod:ctrl,@targettarget] Mind Blast

It casts Mind Flay just fine, but does not at all cast Mind Blast, it just casts Mind Flay again even with the ctrl key depressed.

The goal is to just be able to use this macro to cast spells whether I’m solo questing or in a dungeon helping with damage as I can without having to use a separate macro for each case.

Any help would be greatly appreciated.

/cast [mod:ctrl,harm,nodead][mod:ctrl,@targettarget,harm,nodead][mod:ctrl,@targettargettarget,harm,nodead][mod:ctrl,@targettargettargettarget,harm,nodead]Vampiric Embrace;Shadow Word: Pain

Retail macro, I reduced it a bit because the targettarget nest goes really deep, lol, but though it works ok when I’m by myself, it doesn’t work when I have a friendly targeted that is targeting an enemy.

Macros evaluate left to right so non-default conditions, such as modifiers, need to come first.

/cast [mod:ctrl,harm] [mod:ctrl,@targettarget,harm,nodead] [mod:ctrl] Vampiric Embrace; [harm] [@targettarget,harm,nodead] [] Shadow Word: Pain
/cast [mod:ctrl,harm] [mod:ctrl,@targettarget,harm,nodead] [mod:ctrl] Mind Blast; [harm] [@targettarget,harm,nodead] [] Mind Flay

My Priest macros are here if you want to see how I’ve consolidated my keys.

Wow thanks. I think I had a version that was close but ended up getting frustrated and scrapped it, started over and got further away from what i was trying to achieve. Thanks again.