Hi
I have a problem with following script to change the output device:
It gives following error:
This code seemed to work in Mountain Lion, but now I'm testing this on the Yosemite public beta 2
Any help is appreciated!
I have a problem with following script to change the output device:
Code:
set asrc to (choose from list {"Internal Speakers", "Soundflower (2ch)", "Soundflower (64ch)"} with title "Sound Picker" default items {"Internal Speakers"}) as text
if result is "false" then return
tell application "System Preferences"
reveal anchor "output" of pane id "com.apple.preference.sound"
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
Code:
error "System Events got an error: Cant get window \"Sound\" of process \"System Preferences\"." number -1728 from window "Sound" of process "System Preferences"
Any help is appreciated!