Focus Follows Mouse

Recommended Posts

WideBoyDixon 10

WideBoyDixon 10

Just wrote this as a proof of concept at the moment but I thought I'd share. This script forces the focus to follow the mouse. When the mouse leaves the window then it attempts to restore the previous z-order of the window, based on the order they were retrieved by WinList() in the first place.

Share this post

Link to post

Share on other sites

WideBoyDixon 10

WideBoyDixon 10

That's the strange behaviour I had! Some windows seem to get fixed as topmost so I couldn't see windows underneath them unless they were minimised (or moved). I was hoping someone could figure it out - it must be to do with SetWindowPos but I tried to avoid it by checking for a zero $hAfter

I like the idea of having a delay and a sleep in there; thanks for your input.