Created
February 21, 2014 20:06
-
-
Save mbierman/9142371 to your computer and use it in GitHub Desktop.
Make it easy to choose the destination for your audio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Each of the list corresponds to sound souces like AirPort devices and bluetooth | |
set asrc to (choose from list {"Internal Speakers", "living room", "girl's bedroom", "master bedroom", "OontZ Curve", "OontZ Curve Stereo", "office"} with title "Sound Picker" default items {"Internal Speakers"}) as text | |
if result is "false" then return | |
-- for debugging | |
-- display dialog "src is: " & asrc | |
tell application "System Preferences" | |
reveal anchor "output" of pane id "com.apple.preference.sound" | |
-- Uncomment for debugging | |
-- activate | |
tell application "System Events" | |
tell process "System Preferences" | |
select (row 1 of table 1 of scroll area 1 of tab group 1 of window "Sound" whose value of text field 1 is asrc) | |
end tell | |
end tell | |
quit | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment