Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colinharman/3269270 to your computer and use it in GitHub Desktop.
Save colinharman/3269270 to your computer and use it in GitHub Desktop.
Alfred + Screen Sharing + AppleScript + Mountain Lion = Winning
tell application "Screen Sharing"
activate
tell application "Screen Sharing"
activate
tell application "System Events"
keystroke "osx-mini.local" -- "osx.mini.local" would need to be replaced by "YourComputerName or IP Address"
keystroke return
end tell
end tell
delay 2
tell application "System Events"
set value of attribute "AXFullScreen" of window 1 of process "Screen Sharing" to true
end tell
end tell
tell application "Screen Sharing"
GetURL "vnc://osx-mini.local" -- "osx.mini.local" would need to be replaced by "YourComputerName or IP Address"
end tell
delay 1
tell application "System Events"
set value of attribute "AXFullScreen" of window 1 of process "Screen Sharing" to true
end tell
@colinharman
Copy link
Author

Used the VNC command to remove the need to vis the prompt for no reason, works much more quickly and still sets to full screen after no delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment