Skip to content

Instantly share code, notes, and snippets.

@FrankWu100
Last active October 9, 2015 14:47
Show Gist options
  • Save FrankWu100/16f82d23f37babad4e01 to your computer and use it in GitHub Desktop.
Save FrankWu100/16f82d23f37babad4e01 to your computer and use it in GitHub Desktop.
tell application "System Events"
if button "結束" of window 1 of application process "FaceTime" exists then
click button "結束" of window 1 of application process "FaceTime"
end if
end tell
try
do shell script "killall FaceTime"
end try
do shell script "open tel://+886xxxxxxxx"
tell application "System Events"
repeat while (application process "FaceTime" exists)
if button "通話" of window 1 of application process "FaceTime" exists then
delay 1
click button "通話" of window 1 of application process "FaceTime"
else if button "再試一次" of window 1 of application process "FaceTime" exists then
delay 1
click button "再試一次" of window 1 of application process "FaceTime"
end if
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment