;Resize windows by using scroll wheel ;incrementally, horizontally & vertically #Persistent #SingleInstance force #NoEnv ;#NoTrayIcon SetBatchLines, -1 CoordMode, Mouse, Screen SetMouseDelay, -1 NotchMove=20 ~LButton & WheelUp:: MouseGetPos, ClickX, ClickY, getWindows GoSub, GetMax NewVerSize := curHeight + NotchMove WinMove, ahk_id %getWindows%,,,,, %NewVerSize%, Return ~LButton & WheelDown:: MouseGetPos, ClickX, ClickY, getWindows GoSub, GetMax NewVerSize := curHeight - NotchMove WinMove, ahk_id %getWindows%,,,,, %NewVerSize%, Return ~RButton & WheelUp:: MouseGetPos, ClickX, ClickY, getWindows GoSub, GetMax NewHorSize := curWidth + NotchMove WinMove, ahk_id %getWindows%,,,, %NewHorSize%, Return ~RButton & WheelDown:: MouseGetPos, ClickX, ClickY, getWindows GoSub, GetMax NewHorSize := curWidth - NotchMove WinMove, ahk_id %getWindows%,,,, %NewHorSize%, Return ~XButton1 & WheelUp:: ~LControl & WheelUp:: MouseGetPos, ClickX, ClickY, getWindows GoSub, GetMax NewVerSize := curHeight + NotchMove NewHorSize := curWidth + NotchMove WinMove, ahk_id %getWindows%,,,, %NewHorSize%, %NewVerSize%, Return ~XButton1 & WheelDown:: ~LControl & WheelDown:: MouseGetPos, ClickX, ClickY, getWindows GoSub, GetMax NewVerSize := curHeight - NotchMove NewHorSize := curWidth - NotchMove WinMove, ahk_id %getWindows%,,,, %NewHorSize%, %NewVerSize%, Return GetMax: WinGet, IsMax, MinMax, ahk_id %getWindows% If (IsMax) { ToolTip Windows is already maximized.`nRestore it to normal size first. SetTimer, RemoveToolTip, 5000 Return } WinGetPos,,, curWidth, curHeight, ahk_id %getWindows% Return RemoveToolTip: SetTimer, RemoveToolTip, Off ToolTip Return