One of the speakers that I use with my computer is a bit temperamental, so I want to make an applescript to quickly adjust my balance from middle, to left, to right, and back to middle automatically, to see if it’s packed in again. However, i can’t seem to find any way of doing it easily, and wondered if anyone could help!
It seems that there’s no easy setting to change to alter the balance (that I could find) - the only solutions I could see seem to use the Applescript UI scripting, which I can’t seem to work out how to use.
Can anyone help me?
Model: Powerbook G4
Browser: Safari 525.13
Operating System: Mac OS X (10.4)
tell application "System Preferences"
reveal anchor "output" of pane id "com.apple.preference.sound"
tell application "System Events"
tell slider 1 of group 1 of tab group 1 of window 1 of process "System Preferences"
set value to 1.0
set value to -1.0
set value to 0
I am trying to use your script but with a different configuration! I need a script that change my audio balance to the right automatically when I plug my headphones and when I unplug it backs to “centrum”. it is possible?
You may not need a script for that. On my machine at least, there are separate settings for headphone and speaker output, although only the currently active one is shown in System Preferences.
Open the Sound pane in System Preferences and click the Output button. If your headphones are plugged in, you should see the settings for them. If not, you should see the settings for the speakers. Set the balance as appropriate, unplug (or plug in) the headphones, wait for the display to change, and set the balance again. You should now have separate balances for headphones and speakers. I haven’t tested to see if they survive a restart, but I’ve no reason to suppose that they won’t.