Lateralus138

Minimize all but active window

Jun 17th, 2020
1,540
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;; Pressing [Win]+[Shift]+m - Minimize all windows except the active window.
  2.  
  3. #+m::
  4.     WinGet,windowList,List
  5.     loop,%windowList%
  6.         {
  7.             thisHwnd := windowList%A_Index%
  8.             WinGet,thisWindowStyle,ExStyle,ahk_id %thisHwnd%
  9.             if ((!(thisWindowStyle & 0x00000080))
  10.                 And (!WinActive("ahk_id " thisHwnd)))
  11.                 {
  12.                     WinMinimize,ahk_id %thisHwnd%
  13.                 }
  14.         }
  15.     windowList:=thisHwnd:=thisWindowStyle:=""
  16. return
RAW Paste Data