; RestMax.ahk ; kwacky1, January 2009 ; Coding Snack ; ; Function: Restore or Maximize Windows with Double Click with the Right Mouse Anywhere Inside a Window ; When a window is in restore mode then double clicking with the right mouse anywhere inside the window will maximize the window. ; If the window is in maximized view then doubling clicking with the right mouse will restore the window. #SingleInstance, Force CoordMode, Mouse, Screen DClickT := DllCall("GetDoubleClickTime") ; the system's double click time RButton:: If (A_PriorHotKey = A_ThisHotKey && A_TimeSincePriorHotKey <= DClickT) { ; Double click Send, {Alt} MouseGetPos, , , id WinGet, state, MinMax, ahk_id %id% if state { WinRestore, ahk_id %id% } else WinMaximize, ahk_id %id% } else Click, Right