• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Setting Sound Output Device with GUI Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: A bug in command completion! (From: kai <email@hidden>)

  • Prev by Date: Re: Memory and idle applescript
  • Next by Date: Re: Strip characters without recursive loop
  • Previous by thread: Re: A bug in command completion!
  • Next by thread: InDesign Table overflow problem
  • Index(es):
    • Date
    • Thread