Created
March 11, 2025 16:26
-
-
Save BirkhoffLee/5e549a7a702e4cebb16d038eea68c88c to your computer and use it in GitHub Desktop.
Toggle iPad Mirroring (Raycast Script Command)
This file contains hidden or 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
#!/usr/bin/osascript | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Toggle iPad Mirroring | |
# @raycast.mode silent | |
# Optional parameters: | |
# @raycast.icon 🖥️ | |
# Documentation: | |
# @raycast.author birkhoff | |
# @raycast.authorURL https://raycast.com/birkhoff | |
tell application "System Settings" | |
activate | |
delay 1.5 | |
tell application "System Events" | |
tell process "System Settings" | |
click menu item "Displays" of menu "View" of menu bar item "View" of menu bar 1 | |
delay 1.2 | |
tell group 1 of group 2 of splitter group 1 of group 1 of window "Displays" | |
try | |
click pop up button 1 | |
delay 0.3 | |
click menu item 7 of menu 1 of pop up button 1 | |
on error | |
delay 0.3 | |
click menu item 3 of menu 1 of pop up button 1 | |
end try | |
end tell | |
end tell | |
end tell | |
end tell | |
delay 1.3 | |
tell application "System Settings" | |
quit | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment