on run {input, parameters}
tell application "System Preferences"
activate
reveal pane id "com.apple.preference.sidecar"
delay 1
tell application "System Events" to click first menu button of first window of application process "System Preferences" of application "System Events"
tell application "System Events" to click first menu item of first menu of first menu button of first window of application process "System Preferences" of application "System Events"
quit
end tell
end run
First off, thanks for taking the time to share this workflow :)
I get the "Please make sure you are using macOS Big Sur and have Control Center showing on your menu bar" error.
I'm assuming this line fails:
I also tried this script from reddit:
But that also fails.