Advertisement
WolfieMario

HideWindow.ahk

Sep 29th, 2015
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Window Hiding/Showing Script by Gerrard Lukacs
  2.  
  3. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  4. #Warn  ; Recommended for catching common errors.
  5. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  6.  
  7. global window_ids := []
  8.  
  9. ; Ctrl + Windows Key + Down
  10. ; Hide active window, and remember it
  11. #^Down::
  12.     WinGet win_id, ID, A
  13.     WinHide ahk_id %win_id%
  14.     window_ids.Insert(win_id)
  15. Return
  16.  
  17. ; Ctrl + Windows Key + Up
  18. ; Show all windows hidden during this session
  19. #^Up::
  20.     for index, win_id in window_ids
  21.     {
  22.         WinShow ahk_id %win_id%
  23.     }
  24.     window_ids := []
  25. Return
  26.  
  27. ; Ctrl + Shift + Windows Key + Up
  28. ; Show literally all windows - even those which are meant to stay hidden
  29. ; ... NEVER ACTUALLY USE THIS.
  30. ; #^+Up::
  31. ;     DetectHiddenWindows On
  32. ;     WinGet ids, List
  33. ;     loop %ids%
  34. ;     {
  35. ;         win_id := ids%A_Index%
  36. ;         WinShow ahk_id %win_id%
  37. ;     }
  38. ; Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement