Hey,
sorry, I'm an absouletly newbie in the field of mac programming. But I have programming experience in general.
I have here a new headset and I want the mac to switch automatically Audio Input and Output to the headset, when it's plugged in.
I found this code here:
http://www.oreillynet.com/mac/blog/2006/07/applescript_audio_output_switc.html
I renamed the headset but I got a fault. The event protocoll says:
So in my opinion the script tries to select the 'Output' Radio Button, but doesn't find it. What is the problem here? Im using Mavericks.
Can I modify the script, that it starts automatically, when the headset ist plugged in?
Thanks,
jorettig
sorry, I'm an absouletly newbie in the field of mac programming. But I have programming experience in general.
I have here a new headset and I want the mac to switch automatically Audio Input and Output to the headset, when it's plugged in.
I found this code here:
http://www.oreillynet.com/mac/blog/2006/07/applescript_audio_output_switc.html
I renamed the headset but I got a fault. The event protocoll says:
Code:
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.sound"
end tell
tell application "System Events"
get UI elements enabled
--> true
click radio button "Output" of tab group 1 of window "Sound" of application process "System Preferences"
--> error number -1728 from window "Sound" of application process "System Preferences"
end tell
tell current application
activate
end tell
So in my opinion the script tries to select the 'Output' Radio Button, but doesn't find it. What is the problem here? Im using Mavericks.
Can I modify the script, that it starts automatically, when the headset ist plugged in?
Thanks,
jorettig
Last edited by a moderator: