Skip to content

Instantly share code, notes, and snippets.

@pbfy0
Created September 28, 2016 20:43
Show Gist options
  • Save pbfy0/374cdbc3a447b2e9e251d07e443cbbb0 to your computer and use it in GitHub Desktop.
Save pbfy0/374cdbc3a447b2e9e251d07e443cbbb0 to your computer and use it in GitHub Desktop.
#Persistent
global stored := 0
SetTimer, check, 200
check() {
tmp := WinActive("ahk_exe Brawlhalla.exe") or WinActive("ahk_exe Cities.exe")
;OutputDebug, T = %tmp% S = %stored%
if (tmp != 0) && (stored = 0)
{
;OutputDebug, Hide
stored := 1
WinHide, ahk_class Shell_TrayWnd
WinHide, ahk_class Shell_SecondaryTrayWnd
}
if (tmp = 0) && (stored != 0)
{
;OutputDebug, Show
WinShow, ahk_class Shell_TrayWnd
WinShow, ahk_class Shell_SecondaryTrayWnd
stored := 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment