Last active
June 29, 2021 03:19
-
-
Save fardjad/a4813ab815d2841264ed to your computer and use it in GitHub Desktop.
[center-active-window.ahk] An AutoHotkey script to make WinKey+C center active window #autohotkey #windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Courtesy of http://superuser.com/a/403191 | |
^#c:: | |
WinGetTitle, windowName, A | |
CenterWindow(windowTitleVariable) { | |
WinGetPos,,, Width, Height, %windowTitleVariable% | |
WinMove, %windowTitleVariable%,, (A_ScreenWidth - Width) / 2, (A_ScreenHeight - Height) / 2 | |
} | |
CenterWindow(windowName) | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment