Site icon SumTips

Resize a Program Window to Custom Dimensions using AutoHotkey

If you are looking for a utility to resize a program window in Windows, Sizer is a good option. But, if you are already using AutoHotkey, then here is a tiny script that will allow you to resize a program’s window to any custom dimensions you want:

#=::
    WinGet, window, ID, A
    InputBox, width, Resize window, Enter width:, , 170, 130
    if (width != "")
    {
        InputBox, height, Resize Window, Enter height:, , 170, 130
    }
    WinMove, ahk_id %window%, , , , width, height
    return

The script is configured to work with Win + = keyboard combo, however, you can change it to anything you like.

How to Use?

Simply drop the code to your master AutoHotkey script file or compile the code as an EXE to carry it anywhere you go.

Exit mobile version