Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 is "AirPods Pro") of menu of bt
- click
- tell menu 1
- if exists menu item "Connect" then
- click menu item "Connect"
- else
- click menu item "Disconnect"
- end if
- end tell
- end tell
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement