; On initial run ensures the taskbar is set to Autohide as seen in the OS Taskbar settings ; It then jumps into the continous loop of looking for the taskbars reappearance and shuts that mother fucker down ; Derived from: ; https://hackerspace.kinja.com/another-late-ahk-script-that-hides-the-taskbar-1701996722 #NoEnv ; #NoTrayIcon SendMode Input SetWorkingDir %A_ScriptDir% #SingleInstance force Process, Priority, , High #Persistent HideTaskbar(){ DetectHiddenWindows, On SetTitleMatchMode, 2 if WinExist("ShowTaskbar.ahk ahk_class AutoHotkey"){ WinClose } static ABM_SETSTATE := 10, ABS_AUTOHIDE := 1, ABS_ALWAYSONTOP := 2, ABM_GETSTATE := 4 VarSetCapacity(APPBARDATA, size := 2*A_PtrSize + 2*4 + 16 + A_PtrSize, 0) ; 0 = taskbar is not always-on-top, nor autohide ; 1 = ABS_AUTOHIDE, the taskbar has autohide on ; 2 = ABS_ALWAYSONTOP (deprecated as of Windows 7) GetState := DllCall("Shell32\SHAppBarMessage", UInt, ABM_GETSTATE, Ptr, &APPBARDATA, Int) NumPut(size, APPBARDATA), NumPut(WinExist("ahk_class Shell_TrayWnd"), APPBARDATA, A_PtrSize) If (GetState == 0){ NumPut(ABS_AUTOHIDE, APPBARDATA, size - A_PtrSize) ; set to OS Autohide DllCall("Shell32\SHAppBarMessage", UInt, ABM_SETSTATE, Ptr, &APPBARDATA) ; execute that setting } } ; Hide even the autohidden bar, continously checking if it appears again ; due to explorer being restarted HideTaskbar() Loop { WinWait, ahk_class Shell_TrayWnd WinHide, ahk_class Shell_TrayWnd } return