Created
February 26, 2021 14:38
-
-
Save thanapongp/05e13a675c2dd7364451471d1fb5c7e6 to your computer and use it in GitHub Desktop.
A simple AppleScript that automatically answers any FaceTime call. Useful to make your Mac as a make-shift IP Camera
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" | |
repeat | |
repeat until (exists window 1 of application process "Notification Center") | |
delay 1 | |
log "Wait for notification center" | |
end repeat | |
if exists button "Accept" of window 1 of application process "Notification Center" then | |
log "Answering" | |
click button "Accept" of window 1 of application process "Notification Center" | |
delay 3 | |
tell application "System Events" to keystroke "r" using command down | |
end if | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment