currently on Big Sur beta 9, wanted to know if there is a way to set a trackpad gesture or touchbar button to open apples new control center without having to constantly clicking it on the top bar?
you can use the "run apple script" action to do that with a script like this:
tell application "System Events" to click menu bar item "Control Centre" of menu bar 1 of application process "ControlCenter"
I'll soon add a predefined action to open the Control Center at the current mouse location.
You solved so many scripting issues I had here by telling me how to script that part of the menu bar, you made my evening WAY better
The best trick to find that kind of stuff:
- Open Automator App
- Create a new workflow
- Click the record button
- Perform the action you want to do with Apple Script
- Stop the recording
- Automator will show a list of events, you can select them and press cmd+c, it will copy real Apple Script to your clipboard (the scripts might look weird, but they help a lot with understanding things)
And after saving the evening, the man saves the day! Never knew this could be done!!! (Transforming Automator Actions into Apple Script)