6

One new feature of macOS 13 Ventura is the new layout and design of the system preferences. However, this caused many of my automation scripts to stop working.

Does anyone know how to navigate through the new system preferences? To be precise, what is the equivalent to the following code which is compatible with macOS 13 Ventura?

tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preference.sound"
end tell

The code above worked with old versions fine, but shows

execution error: System Settings got an error: AppleEvent handler failed. (-10000)

in macOS 13 Ventura

Alwin
  • 786
  • 9
  • 19

3 Answers3

2

I've encountered the same issue, it seems to be a known issue, and it was also discussed at https://gist.github.com/rmcdongit/f66ff91e0dad78d4d6346a75ded4b751?permalink_comment_id=4286384

What you're looking for is:

do shell script "open x-apple.systempreferences:com.apple.Sound-Settings.extension"

However, manipulating that screen is another pickle.

Jefklak
  • 31
  • 3
1

The nomenclature of the pane id has changed:

set current pane to pane id "com.apple.Sound-Settings.extension"
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
jwj
  • 11
  • 1
0

Does it have to be AppleScript or is bash okay? If bash is an option, you can use the open command. To your specific ask, you can use the following to open Sound preferences:

open x-apple.systempreferences:com.apple.Sound-Settings.extension

More details can be found here: https://www.macosadventures.com/2022/12/05/how-to-open-every-section-of-macos-ventura-system-settings/

Snomad
  • 45
  • 1
  • 5