これは、私も本当に見たかったものなので、私のためにそれを行うapplescriptです。スタイル ポイントを獲得できるかどうかはわかりませんが、Automator サービスでこれを呼び出し、キーボード ショートカットを設定しました。それ以来、不満はありません。
tell application "System Events"
tell dock preferences
--get the properties list of the dock and set (or assign) it to our variable we'll call "dockprops"
set dockprops to get properties
--in our now "dockprops" list, assign our target dock property ("autohide") to the variable "dockhidestate"
set dockhidestate to autohide of dockprops
--the dock's "autohide" property is a boolean: it's value can only be either true or false
--an "if statement" provides the necessary logic to correctly handle either of these cases in this one single script
if autohide = true then
tell application "System Events"
tell dock preferences to set autohide to not autohide
end tell
else
set autohide to true
end if
end tell
end tell
tell application "System Preferences"
activate
-- tell application "Finder" to tell process "System Preferences" to set visible to false
set the current pane to pane id "com.apple.preference.general"
-- The delays are necessary as far as I can tell
delay 0.5
tell application "System Events" to keystroke tab
delay 0.5
tell application "System Events" to keystroke tab
tell application "System Events" to keystroke tab
tell application "System Events" to keystroke space
tell application "System Events" to key code 13 using {command down}
end tell