Skip to content

Instantly share code, notes, and snippets.

@thanapongp
Created February 26, 2021 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thanapongp/05e13a675c2dd7364451471d1fb5c7e6 to your computer and use it in GitHub Desktop.
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
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