I need to set or toggle auto-hiding of Windows 10 taskbar programmatically. An action bound to a hotkey for productivity and convenience. Is there a command-line command or a DLL call which allows to achieve equivalent of flipping the following switch:
Currently I am achieving this by opening the above Settings window and sending keystrokes for search, followed by Downs and Space and Alt+F4 but it is slow and unreliable.
This question is not language-specific since DLL calls look pretty much the same everywhere, although my final implementation will be in AutoHotKey.
Expected result: After running the command, the Windows Explorer will change its behavior as if the setting Automatically hide the taskbar in desktop mode was enabled (or disabled or toggled).