I have an automator app that switch the audio between mono and stereo. It used to work but Mojave update seems to break it. I have given it accessibility permission, but still no luck. What might be the problem?
tell application "System Preferences"
launch
reveal anchor "Hearing" of pane id "com.apple.preference.universalaccess"
tell application "System Events" to tell process "System Preferences"
delay 0.5
click the checkbox "Play stereo audio as mono" of window "Accessibility"
end tell
end tell
tell application "System Preferences" to quit
The error message is as following:
The action “Run AppleScript” encountered an error: “System Events got an error: Can’t get checkbox "Play stereo audio as mono" of window "Accessibility" of process "System Preferences".”
Thank you in advance!