; This example will visit all open windows and display info ; about each of them: ; Our Window Class: Chrome_WidgetWin_1 IsHidden := 0 DetectHiddenWindows On SetTitleMatchMode, 2 #z:: If IsHidden=0 { OutputDebug Hiding... DetectHiddenWindows,off WinGet, id, list, , , Program Manager Loop, %id% { StringTrimRight, this_id, id%a_index%, 0 ; WinActivate, ahk_id %this_id% WinGetClass, this_class, ahk_id %this_id% OutputDebug WindowClass = %this_class% if (this_class="Chrome_WidgetWin_1") { OutputDebug Hiding Window... WinHide, ahk_id %this_id% } } WinHide, - SumatraPDF WinHide, YouTube Downloader HD IsHidden = 1 } else { OutputDebug Showing... DetectHiddenWindows On WinGet, id, list, , , Program Manager Loop, %id% { StringTrimRight, this_id, id%a_index%, 0 WinGetClass, this_class, ahk_id %this_id% OutputDebug WindowClass = %this_class% if (this_class="Chrome_WidgetWin_1") { OutputDebug Showing Window... WinShow, ahk_id %this_id% } } DetectHiddenWindows,off IsHidden = 0 WinShow, - SumatraPDF WinShow, YouTube Downloader HD } Return