I couldn't get the AutoHotKey script from Gray to work for me on Win 8.1, so I made one.
Put this in a .ahk file
Windows 8.1 version:
Run, %SystemRoot%\System32\rundll32.exe shell32.dll`,Options_RunDLL 1
WinWait, Taskbar and Navigation properties,
IfWinNotActive, Taskbar and Navigation properties, , WinActivate, Taskbar and Navigation properties,
WinWaitActive, Taskbar and Navigation properties,
Send, {ALTDOWN}u{ALTUP}{ALTDOWN}a{ALTUP}{ESC}
Exit
Windows 10 version (tested on version 10.0.17134.523 1/13/2019):
#NoEnv
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
Run ms-settings:taskbar
WinWait, Settings,
WinWaitActive, Settings, , 3
if ErrorLevel
{
MsgBox, WinWait timed out.
}
CoordMode, Pixel, Client
WinGetPos, X, Y, Width, Height
;OutputDebug, Width Height %Width% %Height%
; Wait for Settings UI to load
Sleep 500
if (Width <= 735)
{
Send {TAB}{TAB}{space}
}
else
{
Send {TAB}{TAB}{TAB}{space}
}
;Close the settings UI
Sleep 150
Send !{F4}
Exit
(You may need to adjust the sleep durations if they are not long enough on your system. There is probably a better way to detect when the UI has loaded besides sleeping, but I couldn't figure it out. I couldn't detect the text box control in the UI. I tried to detect a color pattern but the end user has control of the color scheme.)
See this post
– Portland Runner – 2013-10-04T03:05:06.510@PortlandRunner Thanks for the tip. I'd already seen it, but it's trying to do something different, which is to show a hidden taskbar. I want to toggle the auto-hide status of the taskbar, from 'do auto-hide' to 'do not auto-hide', and back again. – Kit Johnson – 2013-10-07T03:30:32.807