Hi all!
I am trying to figure out why my script for switching the sound input source has stopped working in Maverick. It worked great before, but now it will first return an error about not finding the menu item, but if I run the script again right after it works as intended. Any ideas?
# Script to externalize the sound to the TV instead of the computer.
# Written by Daniel Henriksson, May 2011. Based on various internet hints, primarily the following page by Miraglia: http://hints.macworld.com/article.php?story=20050614171126634
tell application "System Preferences" to activate
tell application "System Events"
get properties
#Change the Sound preferences to use the TV (called "32LG2000")
tell process "System Preferences"
click menu item "Sound" of menu "View" of menu bar 1
set theRows to every row of table 1 of scroll area 1 of ¬
tab group 1 of window "sound"
set theOutputs to {} as list
repeat with aRow in theRows
if (value of text field 1 of aRow as text) ¬
is equal to "32LG2000" then
set selected of aRow to true
exit repeat
end if
end repeat
end tell
end tell
tell application "System Preferences" to quit
Thankful for help!