Skip to content

Instantly share code, notes, and snippets.

@masnick
Last active March 31, 2022 19:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save masnick/002ea70d0114320cb0f043d60b504400 to your computer and use it in GitHub Desktop.
Save masnick/002ea70d0114320cb0f043d60b504400 to your computer and use it in GitHub Desktop.
macOS: Set sound output balance to middle
-- Based on the AppleScript posted here: https://secure.macscripter.net/viewtopic.php?pid=190067
tell application "System Preferences"
activate
reveal anchor "output" of pane id "com.apple.preference.sound"
delay 0.5 -- If you get an error, it's possible this delay isn't long enough.
end tell
tell application "System Events"
tell slider 1 of group 1 of tab group 1 of window 1 of process "System Preferences"
set value to 0.5
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment