Re: My AppleScript to choose sound output has broken in Monterey
Re: My AppleScript to choose sound output has broken in Monterey
- Subject: Re: My AppleScript to choose sound output has broken in Monterey
- From: Jim Krenz via AppleScript-Users <email@hidden>
- Date: Wed, 8 Dec 2021 08:57:32 -0800
Hello Axel,
I just tested your script, and it works. Thank you so much!
Sincerely,
Jim
> On Dec 8, 2021, at 8:21am, Axel Lüttgens via AppleScript-Users
> <email@hidden> wrote:
>
>
> Hello Jim
>
> Sorry for being a bit late, but I was still with Mojave here…
>
> It seems that with Monterey, there is no group anymore: the scroll area is an
> immediate child of the window.
> And it helps to force the window to enumerate its ui elements before
> attempting to access them; probably a bug.
>
> tell application "System Events"
> tell application process "ControlCenter"
> try
> click menu bar item "Sound" of menu bar 1
> tell window 1
> UI elements
> tell scroll area 1
> click (first checkbox whose title
> contains "AirPods")
> end tell
> end tell
> end try
> end tell
> end tell
>
> HTH,
> Axel
>
>
>> Le 6 nov. 2021 à 02:13, Jim Krenz a écrit :
>>
>> Hello all,
>>
>> This script was working in Big Sur.
>>
>> I am trying the trial of UI Browser to try to figure this out, but I am
>> failing.
>>
>> Troubleshooting ideas on how to fix this?
>>
>> tell application "System Events"
>> tell process "ControlCenter"
>> try
>> click (first menu bar item whose title is "Sound") of
>> menu bar 1
>> tell scroll area 1 of group 1 of window 1
>> click (first checkbox whose title contains
>> "AirPods Max")
>> end tell
>> end try
>> end tell
>> end tell
>>
>> Thanks!
>>
>> Sincerely,
>>
>> Jim
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden