Make sure that your "ActionButtonUseKeyDown" CVar is set to "1".
This weakaura uses a priority system to cast Power Infusion on someone in your party/raid. Selection priority:
1.If a name is provided in the "Custom Options" tab, it will prioritize them. The player name must match someone in the group exactly. I have not tested it with crazy non-ascii letters.
2.If no name is provided, it will pick a DPS in the party based on this class priority:
Warlock -> DK -> Hunter -> Evoker -> Shaman -> Mage -> Warrior -> Rogue -> Druid -> Paladin -> Monk -> Demon Hunter -> Priest
3.If the priority target is not in range or dead, it will cast PI on you instead.
The priority list is hardcoded into the Action custom code, so you'll have to update it for yourself if you want a different order.
This is the macro I use to activate it:
#showtooltip
/click SmartPowerInfusion LeftButton 1
/cast Power Infusion
Known issues:
1.While out of combat, if you have no target selected and the PI target is either out of range or dead, PI will not be cast at all. This hasn't been a problem for me because I always cast PI while in combat or while I have an enemy selected, which will cause it to selfcast PI if the priority target is out of range or dead.
Shoutouts: I updated the "Auto Tank Misdirect" to create this weakaura. Shoutouts to Chilly @ Draenor, KoviLovesYou, and Proxying (https://github.com/Proxying) who were listed as contributors in the old weakaura.
Disclaimer: Clickable weakauras can cause problems with your UI if not coded correctly or if Blizzard updates their API in a way that breaks the existing dependencies. You can inform yourself about that by joining the Weakaura discord and reading their FAQ.
Please don't ask me to customize this for you, but feel free to make your own updates and post your own version instead.