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


Click here to return to the 'AppleScript to change Sound preferences' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
AppleScript to change Sound preferences
Authored by: deef on Mar 01, '13 09:39:34AM

I two similar scripts to adjust volume and balance when wearing headphones (in part to compensate for partial hearing loss in my R ear):

(sorry about loss of formatting)
#1 Headphones:

set volume 1.5
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.sound"
reveal (first anchor of current pane whose name is "output")
end tell
tell application "System Events"
launch
tell process "System Preferences" to tell slider 1 of group 1 of tab group 1 of window 1 to set value to 0.7
end tell
quit application "System Preferences"

#2 Speakers - edit as follows:
- change the "set volume" line to desired value
- change the "tell process" value to 0 [i.e. center the balance]



[ Reply to This | # ]