Created
October 9, 2015 14:41
-
-
Save FrankWu100/776ba0d802f9a0c2c809 to your computer and use it in GitHub Desktop.
自動用 Handoff 撥打暴雪安全鎖, 成功後再自動啟動 Battle.net
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 "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://+886800303585" | |
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 | |
run application "/Applications/Battle.net.app" | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment