Oct 16, '12 07:30:00AM • Contributed by: dborup
The script is very simple; it must be set up Messages' Alerts preferences. Choose Event > Message Received, then check Run an Apple Script. This will check each message you get for the command; in this case, /photo.
The script will turn the volume all the way down (and up again) before taking a picture with PhotoBooth so it does not make any noise.
Then you can make a symbolic link from the PhotoBooth folder to your Dropbox so you can check the photos from your mobile device.
Here's the script:
using terms from application "Messages" on message received theMessage from theBuddy for theChat if (theMessage begins with "/") then if theMessage begins with "Photo" then beep 3 else set volume 0 tell application "Photo Booth" activate end tell tell application "System Events" tell process "Photo Booth" delay 3 tell application "Finder" set visible of process "Photo Booth" to false end tell tell menu bar 1 tell menu bar item "File" tell menu "File" click menu item "Take Photo" end tell end tell end tell end tell end tell delay 5 tell application "Photo Booth" quit end tell set volume 3 end if end if end message received end using terms from
