Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Check sound balance if audio quality has dropped' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Check sound balance if audio quality has dropped
Authored by: Kemul on Sep 12, '03 03:15:58PM

Well, I have this problem once in a while. So, I tried to write an applescript to re-center the sound balance, inspired by your request.

The script is based on the examples in http://www.apple.com/applescript/GUI/ and will require the installation of UI Scripting beta software from Apple available here. Please remember that you have to set "Enable access for assistive devices" in System Preferences under Universal Access.

Here's the code. Please note I am not a professional applescript scripter. ;-)

tell application "System Preferences"
  activate
end tell

tell application "System Events"
  tell process "System Preferences"
    click menu item "Sound" of menu "View" of menu bar 1
    delay 2
    tell window "Sound"
      tell tab group 1
        click radio button "Output"
        delay 1
        tell group 1
          tell group 1
            set value of slider 1 to 0
          end tell
        end tell
      end tell
    end tell
  end tell
end tell

ignoring application responses
  tell application "System Preferences" to quit
end ignoring


[ Reply to This | # ]
Check sound balance if audio quality has dropped
Authored by: makeinu on Sep 13, '03 12:49:59PM
lol, Kemul beat me to it. Here's my version, with a few extra delays in it, to ensure success and to allow for user verification of results.
tell application "System Preferences"
	activate
end tell
delay 0.25
tell application "System Events"
	tell process "System Preferences"
		click menu item "Sound" of menu "View" of menu bar 1
		delay 4
		click radio button 2 of tab group 1 of window 1
		delay 1
		tell slider 1 of group 1 of group 1 of tab group 1 of window 1
			delay 1
			set value to 0
		end tell
	end tell
end tell
delay 3
tell application "System Preferences"
	quit
end tell
I also have it available as a compiled script here. Simply unstuff it and place it in ~/username/Library/Scripts, then access it from the script menu. Or whatever you like.

[ Reply to This | # ]