This code works for some windows (Firefox for example), but it doesn't work for Windows Explorer windows. Why?
Debugging MsgBox shows correct WinTitle and new size, but WinMove takes no action.
Code: Select all
#!h:: ; shrink active window to 1/2 size WinGetTitle, WinTitle, A WinGetPos, MyX,MyY, WWidth, WHeight, A WinRestore, %WinTitle% ; unmaximize if maximized WWidth := WWidth // 2 WHeight := WHeight // 2 MsgBox, For Window %WinTitle% -- new size %WWidth% x %WHeight% WinMove, %WinTitle%,, MyX, MyY, WWidth, WHeight return