Reset mouse-cursor?

Hello i was wandering is it possible to make a macro that if I have the task to dispel the group im with like this:
/cast [target=party1] dispel
/cast [target=party2] dispel
and so on, that i can just spam and it removes whatever the group is affected with even if ONE PLAYER in the party is DEAD (this is the important part) lets say party2 player he is DEAD then the macro stops and wont move to the next line in the macro, because the mousecursor gets activated then it has to be right-clicked to continue with gameplay.