Last active
February 4, 2022 13:37
-
-
Save yangwao/7fb4fe87e30c67b24db9dc9c85d4911b to your computer and use it in GitHub Desktop.
sidecar_monterey.app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### How to connect ipad as secondary display at Monterey | |
### Connect Side Car on Monterey | |
### Author https://twitter.com/yangwao | |
### https://github.com/yangwao | |
### Open script editor and save as app | |
### Don't forget to add permisions in privacy window to controll it | |
### Original Source https://www.reddit.com/r/MacOS/comments/il8x0y/is_it_possible_to_automatically_connect_to/g3tlhxc/ | |
### Missing to check for accidental glitches if ipad is connected, but not showing display, yeah happen so something that would cycle would be warm welcome | |
### You need allow permission in Security & Privacy > Accessibility > your_script_name.app | |
tell application "System Preferences" | |
reveal pane id "com.apple.preference.displays" | |
delay 0.5 | |
tell application "System Events" to click first pop up button of first window of application process "System Preferences" of application "System Events" | |
delay 0.5 | |
tell application "System Events" to click second menu item of first menu of first pop up button of first window of application process "System Preferences" of application "System Events" | |
quit | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
update seems https://www.reddit.com/r/MacOS/comments/il8x0y/is_it_possible_to_automatically_connect_to/g3tlhxc/