576: No Judgement Here

Voice Control seems really nifty, thanks for the tip! I’d been wanting a “Siri dictation, but without interruption” for a while now – if I’d know this was available, I wouldn’t have held off upgrading to Catalina. (Apparently it’s a Catalina-only feature.)

Like others, I wanted to toggle Voice Control on and off. Even on my 2020 iMac, other apps get more sluggish when I have Voice Control enabled.

I took the AppleScript from the Keyboard Maestro forum, and I tweaked it to preserve state. In particular,I was annoyed that it would always quit System Preferences, even if I already had it open. I don’t like it when scripts mess with state that’s unrelated to the task at hand.

My variant of the script keeps it open, and returns you to the System Preferences pane you originally had open.

tell application "System Preferences"
	if it is running then
		set systemPreferencesIsAlreadyRunning to true
		set theCurrentPaneId to the id of the current pane
	else
		set systemPreferencesIsAlreadyRunning to false
	end if
	
	reveal anchor "Dictation" of pane id "com.apple.preference.universalaccess"
	
	delay 0.5
	
	tell application "System Events"
		tell process "System Preferences"
			click checkbox "Enable Voice Control" of group 1 of window "Accessibility"
		end tell
	end tell
	
	if systemPreferencesIsAlreadyRunning then
		reveal pane id theCurrentPaneId
	else
		quit
	end if
end tell
2 Likes