Skip to content

Instantly share code, notes, and snippets.

@martinraison
Last active February 7, 2016 19:51
Show Gist options
  • Save martinraison/db1b732e877baad4d93f to your computer and use it in GitHub Desktop.
Save martinraison/db1b732e877baad4d93f to your computer and use it in GitHub Desktop.
Calling someone from the OSX terminal
#!/usr/bin/env osascript
-- usage: facetime johndoe@xyz.com
on run {contact}
do shell script "open facetime://" & contact
tell application "System Events"
repeat while not (button "Call" of window 1 of application process "FaceTime" exists)
delay 1
end repeat
click button "Call" of window 1 of application process "FaceTime"
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment