AutoHotkey: Toggle Maximize Window (Fullscreen)

By Xah Lee. Date: . Last updated: .

Here's AutoHotkey script to toggle maximize window.

; file name: toggle_max_window.ahk
; description: toggle maximize/restore current window
; Version: 2021-02-21, 2022-12-03
; URL: http://xahlee.info/mswin/autohotkey_toggle_maximize_window.html
toggleMaxWindow()
{
  WinGet, WinState, MinMax, A
  if (WinState = 1)
  {
    WinRestore, A
  }
  else
  {
    WinMaximize, A
  }
}

F1::toggleMaxWindow()

2021-05-26 thanks R34P3R for help.