Created
April 8, 2014 15:06
-
-
Save iloveitaly/10139144 to your computer and use it in GitHub Desktop.
Setup a AppleScript trigger in Messages when a share my screen request is received via AppleScript
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
tell application "Messages" to activate | |
delay 3 | |
tell application "System Events" | |
tell process "iChat" | |
keystroke "," using command down | |
click button "Alerts" of tool bar 1 of window 1 | |
delay 0.5 | |
tell group 1 of group 1 of window 1 | |
click pop up button 2 | |
click menu item "Invitation to Share My Screen" of menu 1 of pop up button 2 | |
set applescript_box to checkbox "Run an AppleScript script:" | |
if not value of applescript_box as boolean then | |
click applescript_box | |
end if | |
set script_menu to pop up button 3 | |
click script_menu | |
click menu item "AutoAccept.scpt" of menu 1 of script_menu | |
end tell | |
end tell | |
end tell | |
tell application "Messages" to quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment