I got tired of Windows (TM) constantly moving my windows off screen when turning a monitor off. Here is an AutoHotKey script to move them back on screen so they are visible.
- Download caps_lock_move_window_to_mouse.exe
- Double click on the
caps_lock_move_window_to_mouse.exe
file to run it. - Use
Alt-Tab
to cycle to the window you want to move to your mouse. - Press
Caps Lock
to move it. - To exit the utility press
Scroll Lock
. (Note: On some keyboards you might need to pressFn
.)
- Install AutoHotKey (*).
- Save the following as:
caps_lock_move_window_to_mouse.ahk
SetTitleMatchMode, 2
DetectHiddenWindows, On
CoordMode,Mouse,Screen
CapsLock::
MouseGetPos, xpos, ypos
WinMove, A,,xpos,ypos
return
Scrolllock::
ExitApp
- Double click on the
.ahk
file to run it. - Use
Alt-Tab
to cycle to the window you want to move to your mouse. - Press
Caps Lock
to move it. - To exit the utility press
Scroll Lock
. (Note: On some keyboards you might need to pressFn
.)
(*) (I placed a mirror in bin/
for convenience.)
One can use the WindowsKey + Arrow Key
to move a window to the edge the screen. Unfortunately,
this does NOT work if the window is offscreen.
If you Shift+RightClick
on the icon in the taskbar you get this menu:
Again, this does NOT work with certain program such as Discord.
Hence this utility.