Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repeat
- -- Check to see if Facetime is active
- tell application "System Events" to set theCount to the count of (processes whose name is "Facetime")
- if theCount = 0 then
- do shell script "sleep 1"
- else
- tell application "FaceTime" to activate
- do shell script "sleep 2"
- tell application "FaceTime" to activate
- tell application "System Events" to tell process "FaceTime"
- if name of front window contains "with" then
- do shell script "sleep 5"
- else
- tell application "System Events" to activate application "FaceTime"
- keystroke return
- do shell script "sleep 5"
- -- Check to see if call is active
- tell application "System Events" to tell process "FaceTime"
- if name of front window contains "with" then
- do shell script "sleep 5"
- else
- -- Quit Facetime if call is not active
- tell application "FaceTime" to quit
- do shell script "sleep 5"
- end if
- end tell
- end if
- end tell
- end if
- end repeat
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement