Step 8The Software (Applescript) & More
To allow a single mobile, open terminal and type:
defaults write com.apple.FaceTime AutoAcceptInvitesFrom -array-add +15205551212
(where the number on the end is your iPhone) It will activate facetime, even if its not open.
APPLESCRIPT CODE:
-- Starts Facetime Session
open location "facetime://15205551212"
delay 5
-- simulate pressing the Enter key
tell application "System Events"
keystroke return
-- 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
-- starts automator script to take picture and email it
tell application "Take Picture and E-mail" to launch
tell application "Take Picture and E-mail" to activate
delay 5
-- Starts Video capture
tell application "QuickTime Player 7"
try
activate
new movie recording
start first recording
do shell script "sleep 10"
set status to true
repeat until status = false
-- sets how long facetime will ring your phone (30 secs)
delay 45 -- if call is active wait 60 seconds before rechecking
--3600 is 1 hour, 1800 =1/2 hour, 60 =1 min, 300 =5 mins
--add 300 (5 mins) ahead/behind starting
-- Check to see if call is still active
tell application "FaceTime" to activate
tell application "System Events" to tell process "FaceTime"
if name of front window contains "not available" then
do shell script "sleep 1"
set status to false
else
-- Check to see if call is still active
tell application "FaceTime" to activate
tell application "System Events" to tell process "FaceTime"
if name of front window contains "with" then
set status to true
do shell script "sleep 5"
-- Check to see if call is still active
else
-- Quit Facetime / video recording if call is not active
tell application "System Events" to tell process "FaceTime"
if name of front window contains "facetime" then
set status to false
tell application "FaceTime" to quit
do shell script "sleep 1"
tell application "QuickTime Player 7"
stop first recording
tell application "QuickTime Player 7"
quit
end tell
end tell
end if
end tell
end if
end tell
end if
end tell
end repeat
end try
end tell
end if
end tell
end
end
end
-------------------------------------------------------------------
Please note This code:
-- starts automator script to take picture and email it
tell application "Take Picture and E-mail" to launch
tell application "Take Picture and E-mail" to activate
This activates a Apple AUTOMATOR script to take a photocapture of the video feed, and email it to me
and start a video capture or the doorbell camera / audio and save it as a .mov file (poor man's DVR)
Here is a great Tutorial how to do this by TUAW's Cory Bohon
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|

















































