Setting Sound Output Device with GUI Scripting
Setting Sound Output Device with GUI Scripting
- Subject: Setting Sound Output Device with GUI Scripting
- From: Johnny AppleScript <email@hidden>
- Date: Tue, 19 Aug 2003 08:51:29 -0600
Hello,
I'm trying to automate the selection of System Preferences > Sound > Output.
On most machines, I have two choices: Built-in Audio Controller and iMic USB
audio system.
Using UI Inspector and PreFab UI Browser, I can determine the hierarchy all
the way down to the text field itself, but I can't figure out how to change
the selected item in a scroll area. I've tried so many variations, I'm lost.
I've looked in the archives, and on other forums, but haven't come up with a
keyword search that returns any results I can fathom.
Any help would be appreciated; here's where I'm stuck so far, minus a couple
dozen other tries at the syntax:
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Sound" of menu "View" of menu bar 1
delay 3
tell window "sound"
if (exists tab group 1) then
tell tab group 1
click radio button "Output"
delay 1
get selected of column 1 of table 1 of scroll area 1 of tab group 1 of
window "Sound"
--> no result
get selected of column 1 of table 1 of scroll area 1 of browser 1 of tab
group 1 of window "Sound"
--> no result
get every static text of radio group 1 of scroll area 1
of browser 1 of tab group 1 of window "Sound"
--> {}
--> need to change the selection of the above element from one to the other
as desired
end tell
end if
end tell
end tell
end tell
(*
ignoring application responses
tell application "System Preferences" to quit
end ignoring
*)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.