My existing script with Autohotkey 1 is no longer working.
I searched the internet and was able to hide*(the taskbar disappeared only, but the taskbar space became empty and did not hide to free space--which is not what I wanted), but unable to enable it again.
Can anyone help?
Thank you in advance.
My old script works properly in V1:
Code: Select all
#!Z:: HideShowTaskbar(hide := !hide)
HideShowTaskbar(action) {
static ABM_SETSTATE := 0xA, ABS_AUTOHIDE := 0x1, ABS_ALWAYSONTOP := 0x2
VarSetCapacity(APPBARDATA, size := 2*A_PtrSize + 2*4 + 16 + A_PtrSize, 0)
NumPut(size, APPBARDATA), NumPut(WinExist("ahk_class Shell_TrayWnd"), APPBARDATA, A_PtrSize)
NumPut(action ? ABS_AUTOHIDE : ABS_ALWAYSONTOP, APPBARDATA, size - A_PtrSize)
DllCall("Shell32\SHAppBarMessage", UInt, ABM_SETSTATE, Ptr, &APPBARDATA)
}