Okay, here’s the deal.
Target is a unit.
Mouseover is a unit.
Focus is a unit.
Raid3 is a unit.
Party4 is a unit.
Arena1 is a unit.
Pet is a unit.
Player is a unit.
Concatenated combinations of these are units.
TargetPet is a unit. (the pet of your target)
TargetPetTarget is a unit. (the target of the pet of your target).
“Mousever target” is the target of your mouseover unit.
I think part of this is that in conflating what some of these words mean, you’ve lost the narrative of what you want.
There is no way to “set” your mouseover unit to anything. It’s only and always the unit under your cursor.
If you want to set your TARGET unit to be your MOUSEOVER unit you’re going to have to move your cursor to the unit you want to be your target and click on it.
You COULD use a macro for that but it’s pointless. Just click the unit you’ve moused over and there you go. You’d still have to move your mouse over the unit you want to be your target and click the button the macro is on (far less intuitive).
If you want to target the nearest enemy in your forward cone then this will do it, but it’s irrelevant what your “mouseover” unit or even your current target is.
/cleartarget
/targetenemy
If you want to ensure that it’s a PLAYER that you’re targeting, use this instead.
/cleartarget
/targetenemyplayer
Those will drop your current TARGET UNIT and then replace it with the nearest enemy/enemy player in your forward cone.
If I understand the problem correctly, sometimes you are in combat, you can’t tell who or what is closest to you, your current target has died so you’re not actually attacking anything at all, and you can’t figure out who or what is in front of you because the scrum is too dense.
If that’s true, let me know.
I have a solution but I don’t want to post it if I’m solving the wrong problem.