Skip to content

Instantly share code, notes, and snippets.

@j-adel
Created March 5, 2023 23:38
Show Gist options
  • Save j-adel/728b81d0cda6117f9f3362f40dbde77c to your computer and use it in GitHub Desktop.
Save j-adel/728b81d0cda6117f9f3362f40dbde77c to your computer and use it in GitHub Desktop.
#Up::
MinList := []
WinGet, WinList, List
Loop % WinList {
WinGet, WinState, MinMax, % "ahk_id " WinList%A_Index%
if (WinState < 0) {
MinList.Insert(WinList%A_Index%)
}
}
if (MinList.Length() > 0) {
LastWinID := MinList[MinList.Length()]
WinRestore % "ahk_id " LastWinID
WinActivate % "ahk_id " LastWinID
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment