• 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
Any idea why this script stopped working when I upgraded to Big Sur?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Any idea why this script stopped working when I upgraded to Big Sur?


  • Subject: Any idea why this script stopped working when I upgraded to Big Sur?
  • From: Jim Krenz via AppleScript-Users <email@hidden>
  • Date: Fri, 12 Feb 2021 16:23:30 -0800

Hello all,

This script was working before I upgraded to BigSur.

Any ideas on how to fix it?

Is there a AppleScript dictionary for menu bar items?

tell application "System Events" to tell process "SystemUIServer"
        set bt to (first menu bar item whose description is "bluetooth") of
menu bar 1
        click bt
        tell (first menu item whose title contains “AirPods") of menu of bt
                click
                tell menu 1
                        if exists menu item "Connect" then
                                click menu item "Connect"
                                say "Connected"
                        else
                                click menu item "Disconnect"
                                say "Disconnecting"
                        end if
                end tell
        end tell
end tell
 _______________________________________________
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

  • Follow-Ups:
    • Re: Any idea why this script stopped working when I upgraded to Big Sur?
      • From: Axel Lüttgens via AppleScript-Users <email@hidden>
    • Re: Any idea why this script stopped working when I upgraded to Big Sur?
      • From: Yvan KOENIG via AppleScript-Users <email@hidden>
  • Prev by Date: Re: Man entry to pdf variant command
  • Next by Date: Re: Any idea why this script stopped working when I upgraded to Big Sur?
  • Previous by thread: Re: Man entry to pdf variant command
  • Next by thread: Re: Any idea why this script stopped working when I upgraded to Big Sur?
  • Index(es):
    • Date
    • Thread