Last active
July 12, 2022 03:26
-
-
Save JoeGlines/993d4392829e5179c6bcfd37811d4edb to your computer and use it in GitHub Desktop.
Hide windows from Taskbar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
;******************************************************* | |
#Include <default_Settings> | |
;************************************** | |
#SingleInstance,Force ;only allow for 1 instance of this script to run | |
SetTitleMatchMode,2 ;2 is match anywhere in the title | |
^1:: | |
Hide_Window("OBS 25") | |
Hide_Window("C:\Users\Joe\Dropbox\_Videos") | |
return | |
^2:: | |
Show_in_Taskbar("OBS 25") | |
Show_in_Taskbar("C:\Users\Joe\Dropbox\_Videos") | |
return | |
Hide_Window(Window){ | |
WinActivate,%Window% ;Activate the specific window | |
WinWait %Window% ;Wait for it to be active | |
DetectHiddenWindows On ;not sure why this is needed | |
WinHide %Window% ; All of the following commands use the "last found window" determined by WinWait (above) | |
WinSet, ExStyle, +0x80 %Window% ; Hide program from Taskbar | |
WinShow ;make the program visible | |
} | |
Show_in_Taskbar(Window){ | |
WinActivate,%Window% ;Activate the specific window | |
WinWait %Window% ;Wait for it to be active | |
DetectHiddenWindows On ;not sure why this is needed | |
WinSet, ExStyle, ^0x80 %Window% ; Toggle the program being visible | |
WinShow %Window% ;make the program visible | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment