Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jamland/2c0476fc91f1a9f3e8da066584ebe071 to your computer and use it in GitHub Desktop.
Save jamland/2c0476fc91f1a9f3e8da066584ebe071 to your computer and use it in GitHub Desktop.
Toggle Mono/Stereo Audio Output. MacOS 10.14
-- Tested on MacOS 10.14
-- May not work for versions below or above
tell application "System Preferences"
reveal anchor "Hearing" of pane id "com.apple.preference.universalaccess"
end tell
tell application "System Events"
tell application process "System Preferences"
-- set frontmost to true
tell window "Accessibility"
##--> pre 10.9 set monoStereoCheckbox to checkbox 2 of group 1
set monoStereoCheckbox to checkbox "Play stereo audio as mono" of group 1
tell monoStereoCheckbox to click
end tell
end tell
end tell
if application "System Preferences" is running then
tell application "System Preferences" to quit
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment