mikelxc / sidecar-alfredworkflow

An Alfred Workflow that toggles sidecar function
25 stars 4 forks source link

Not working on Monterey 12.0.1 #6

Open joepio opened 3 years ago

joepio commented 3 years ago

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:

            perform action "AXPress" of menu bar item "Control Center" of menu bar 1

I also tried this script from reddit:

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

But that also fails.

MonFig commented 2 years ago

See https://github.com/raycast/script-commands/blob/84e3fd7e21a2d27f1a7736d36a8f17b23ee9a42c/commands/system/sidecar-toggle.template.applescript