From ef9156137674e294d9e8992c853aac1669747587 Mon Sep 17 00:00:00 2001 From: Justin Clareburt Date: Tue, 14 Jul 2020 22:37:29 +1000 Subject: [PATCH] Fixed full-screen resize to work on multi-monitors. --- Window Move HotKeys.ahk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Window Move HotKeys.ahk b/Window Move HotKeys.ahk index f2f9203..aa75cf4 100644 --- a/Window Move HotKeys.ahk +++ b/Window Move HotKeys.ahk @@ -293,9 +293,13 @@ return !+#Enter:: ; Move and Resize window to full screen WinGetPos, WinX, WinY, WinW, WinH, A ; "A" to get the active window's pos. -NewH := Screen_Y ; Set the window width equal to the width of the screen less the taskbar -NewW := Screen_X ; Set the window height equal to the height of the screen -WinMove, A, , 0, 0, NewW, NewH +WinNum := GetWindowNumber() +SysGet, Mon, MonitorWorkArea, %WinNum% +NewX := MonLeft +NewY := MonTop +NewH := MonBottom - MonTop ; Set the window height equal to the height of the screen +NewW := MonRight - MonLeft ; Set the window width equal to the width of the screen less the taskbar +WinMove, A, , NewX, NewY, NewW, NewH return !#Backspace::