Skip to content

Instantly share code, notes, and snippets.

@straef
straef / AutoHotKey.ahk
Last active September 22, 2024 22:03
AutoHotKey Simple Center
#Requires AutoHotkey v2
; SendMode Input
; centers current window without changing dimensions by pressing win + alt + up-arrow
#!Up::CenterActiveWindow()
CenterActiveWindow()
{
; get the current monitor from the active window handle
NumPut("UInt", 40, buf := Buffer(40,0))