Filed under: Features, How-tos
Mac Automation: Get remote screenshots via Mail
I've talked about getting your Mac to shutdown via an e-mail (or even take a picture from your iSight and e-mail it back to you), but I have received some comments and e-mails about using this script to send a snap of your computer screen when you want to "check up." So, in this Automator tutorial, I am going to show how to get a screenshot of your Mac no matter where you are -- via e-mail.Continue reading to learn how to generate screenshots via Mail.
Let's first create the Automator workflow; this will take the screenshot and e-mail it to you. To create this workflow, just place the following Automator actions together (in the same order):
- Take Screenshot
- New Mail Message
- Send Outgoing Messages

Now let's tweak a couple of the settings in the Automator actions. For the "Take Screenshot" action, select the "Type" as "Full Screen." In the options section select "Main Monitor Only" if you have only one monitor hooked up to your system. Under the "Save To:" option, click the drop-down menu and select "New" then type in a file and choose a location and click save. In the "New Mail Message" action, type in all of the information that you would like, being sure not to type anything in the body of the message.
Saving the Automator workflow
Let's save the Automator workflow somewhere where you can find it later (for instance, you may want to create an "Automator" directory in your Documents directory). In Automator, click File > Save, select "Application" from the "Format" drop down box; type a file name, then click save.
Creating the AppleScript
This is going to be an extremely simple AppleScript, since we just need an AppleScript to launch our Automator application we just made. Open the Script Editor.app (found in /Applications/AppleScript/). Paste the following script into the editor (if you saved your Automator workflow as a different name, replace the "Mail Screenshot" to the name of your saved workflow).
tell application "Mail Screenshot" to launch

Creating the mail rules
To link all the parts together, let's create the Mail rules. Open Mail.app's preferences (command + , ) then click Rules. Click the "Add Rule" button. Type a description and select "All" for the "If ALL of the following conditions are met."
Now let's add the conditions (you will have to click the plus sign to add more conditions):
- From ... Contains ... you@youremail.com
- Subject ... Is Equal To ... System&*Screenshot
- Message Content ... Contains ... Screenshot
- Set Color ... of Background ... Blue
- Run AppleScript ...
Running the Script
To run the script, all you need to do is send an e-mail from the account specified with "System&*Screenshot" in the subject line, and "Screenshot" in the body of your message.
Additional Information
- Please note that scripts such as these may be used against you by: co-workers, roommates, friends, crazy monkeys, and people on Digg
- By changing the subject line condition to be a "password," you will decrease the likeliness that #1 will happen
- You can include unusual characters for message content conditions (i.e. #, @, or ^) in order to avoid accidentally running a script that you didn't want (for example use: #shutdown# instead of just shutdown)
- It is also a good idea to have Mail.app check for new messages often for this to work well

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Dan said 10:16PM on 5-19-2008
You can also use twitter to launch these scripts by RSS or mail updates. Get the information by sending a txt message.
This example of launching scripts with twitter shows you how to use photo both to take a picture of who ever is in front of your computer anytime you send a tweet.
http://www.maciverse.com/control-your-mac-with-twitter.html
Reply
starwxrwx said 12:09AM on 5-20-2008
can it be run when your account is fast-logout'ed ? ie at the name/password prompt? or alternatively during a password-locked screensaver?
Reply
sachin said 12:37AM on 5-20-2008
I love this thing its amazing!!! will try this
Sachin
http://multiple-choice-questions.blogspot.com
Reply
Jono said 4:47AM on 5-20-2008
Great tip, thanks Corey!
Reply
wilco said 3:02AM on 5-21-2008
does anyone happen to know how to do this exact same concept, but to use an app like wiretap pro to record audio files from your computer, via email command? i'm completely new to automator and applescript. would love to know if anyone has any clues!
Reply
Gikku said 8:53AM on 5-24-2008
nice one!
http://i154.photobucket.com/albums/s266/gikku/autoscreenie_2.jpg
[IMG]http://i154.photobucket.com/albums/s266/gikku/autoscreenie_2.jpg[/IMG]
Reply