Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FrankWu100/776ba0d802f9a0c2c809 to your computer and use it in GitHub Desktop.
Save FrankWu100/776ba0d802f9a0c2c809 to your computer and use it in GitHub Desktop.
自動用 Handoff 撥打暴雪安全鎖, 成功後再自動啟動 Battle.net
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