Discipline Priest Rapture/ PW: Shield Macro

I wanted to know the best way to generate an alt modifier macro which allows me to cast this macro when alt is pressed:

#showtooltip

/cast [@mouseover,help,nodead] [help] [@player] Rapture

and PW: shield when no alt modifier is pressed.

I currently have this:

#showtooltip

/cast [mod:alt,@mouseover,exists,nodead] [mod:alt] Rapture; [@mouseover,exists,nodead] [] Power Word: Shield

It works okay, but i believe it lacks the extra functionality of knowing to target myself with rapture or PW: shield if I’m not moused over a target, like my current rapture macro has. I was not sure if it is as simple as replacing my rapture macro in the spot where:

[mod:alt,@mouseover,exists,nodead] [mod:alt] Rapture

currently is, or if it is more complex.

Please advise, and if it is possible i would love to understand more how it works so i can learn incase i have a future need to do something similar. I am intending to get all my spells ordered in this way where I can swap my entire first row of binds to three different sets depending on if no modifier, alt mod, or shift mod are pressed.

Thank you so much!

Your macro is correct but I’d change exists to help. As for the self casting, make sure you have Self Cast set to Auto in the game options.

If you want to see my setup for what you’re trying to do: