Mouse follows focus in Windows, an AutoHotkey script

If you are unlucky enough to have to use Windows, but lucky enough to get AutoHotkey installed, then here is a script that I use to enable the mouse-follows-focus function which I find indispensable. Somewhere deep in the settings, Windows has focus-follows-mouse, i.e. focus (and raise) the window where the mouse pointer currently is, which is good if you find the mouse the quickest way to switch between windows. But apparently the only way in Windows to get mouse-follows-focus, i.e. automatically bring the mouse pointer to the window that you switched to by keyboard, is an AutoHotkey script.
Continue reading “Mouse follows focus in Windows, an AutoHotkey script”