Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save colinharman/3269270 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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