I want to have this button be turned off not toggle

every time i run this macro it toggles the button.
i want it to turn off if on & just stay off if it's already off.

Keyboard Maestro Actions.kmactions (1.1 KB)

You'd have to find a way to check the status of the toggle switch, or the status of the actual setting, then you could use this status information to set a condition for an If Then or a Switch/Case — IF status of toggle/setting is on/true, THEN toggle switch (off), OTHERWISE do nothing (leave off)

I tried, without any luck, to find an AppleScript, or the like, to return this information. Instead I found an AppleScript that switches this setting off, without toggling, without any UI manipulation.

Execute an AppleScript.kmactions (913 B)

EDIT: Shared it as an action instead of as a macro

1 Like

I presume that the underlying aim is to turn automatic showing/hiding off, rather than to interact with System Settings. If that is correct, then you might prefer to use the following shell script:
defaults write com.apple.dock "autohide" -bool "false" && killall Dock

Note: System Settings will not visually reflect this change until it has been relaunched (as, sadly, one might expect).

1 Like