How to toggle dictation in Ventura?

Hello,

the dictation interface has changed from Mojave to Ventura and my macro to toggle dictation does not work because dictation is how a checkbox, and no longer a simple standard button

I can easily arrive at this menu with the Open Keyboard Preference Pane action below.

The button I am trying to toggle is displayed below, red arrow, lower image and is accessed via settings → keyboard → scroll down to dictation.

It can be turned on via the system settings menu (edit → Start Dictation...) as shown below, BUT once on there is no menu item to turn it off which is essential for privacy reasons.

The shortcut depicted as number 2 lower image only serves to turn on the microphone, not turn on dictation per se.

The apple script below which I create with UI Browser does not work with error message- " can't get of application process "System Settings""

thank you very much

image

tell application "System Events"
tell process "System Settings"
click checkbox 1 of group 4 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Keyboard – 100%"  of application process "System Settings"

end tell
end tell

I found the solution and will answer my own question. My AppleScript works if I delete "of application process "System Settings". I am leaving my post because it may interest other forums members with the same problem but the moderators and the master @peternlewis should delete it if they would prefer to do so

1 Like

Yep, since line 2 of your AppleScript already refers to process "System Settings", then the addition of it at the end of line 3 causes an error. Thus, removing it makes it work.

2 Likes