Created
December 26, 2023 21:25
-
-
Save peheje/4729ff26c702e20a54ee836df75e8350 to your computer and use it in GitHub Desktop.
Windows 11 toggle auto hide start menu
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
#!D::HideShowTaskbar() | |
HideShowTaskbar() { | |
static ABM_SETSTATE := 0xA, ABS_AUTOHIDE := 0x1, ABS_ALWAYSONTOP := 0x2 | |
static hide := 0 | |
hide := !hide | |
APPBARDATA := Buffer(size := 2*A_PtrSize + 2*4 + 16 + A_PtrSize, 0) | |
NumPut("UInt", size, APPBARDATA), NumPut("Ptr", WinExist("ahk_class Shell_TrayWnd"), APPBARDATA, A_PtrSize) | |
NumPut("UInt", hide ? ABS_AUTOHIDE : ABS_ALWAYSONTOP, APPBARDATA, size - A_PtrSize) | |
DllCall("Shell32\SHAppBarMessage", "UInt", ABM_SETSTATE, "Ptr", APPBARDATA) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment