Try your hand at the Spore Creature Creator and win free stuff from Big Download!

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.

Creating the Automator workflow
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
Now save the AppleScript by clicking File > Save in the Script Editor. Type in a file name and make sure the "File Format" is set to "Script" before clicking the save button.

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):
  1. From ... Contains ... you@youremail.com
  2. Subject ... Is Equal To ... System&*Screenshot
  3. Message Content ... Contains ... Screenshot
Add these rules under "perform the following actions" :
  1. Set Color ... of Background ... Blue
  2. Run AppleScript ...
For the run AppleScript rule, click the choose button and find your AppleScript that you just made. Then click the "Choose File" button.

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
  1. Please note that scripts such as these may be used against you by: co-workers, roommates, friends, crazy monkeys, and people on Digg
  2. By changing the subject line condition to be a "password," you will decrease the likeliness that #1 will happen
  3. 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)
  4. It is also a good idea to have Mail.app check for new messages often for this to work well

Related Headlines

Reader Comments (Page 1 of 1)

Add your comments

Please keep your comments relevant to this blog entry. Email addresses are never displayed, but they are required to confirm your comments.

When you enter your name and email address, you'll be sent a link to confirm your comment, and a password. To leave another comment, just use that password.

To create a live link, simply type the URL (including http://) or email address and we will make it a live link for you. You can put up to 3 URLs in your comments. Line breaks and paragraphs are automatically converted — no need to use <p> or <br> tags.

New Users

Current Users

TUAW Features


Mac 101 ask-tuaw
Mac News
WWDC (251)
.Mac (60)
Accessories (635)
Airport (75)
Analysis / Opinion (1333)
Apple (1645)
Apple Corporate (558)
Apple Financial (188)
Apple History (45)
Apple Professional (54)
Apple TV (160)
Audio (446)
Bad Apple (118)
Beta Beat (152)
Blogging (84)
Bluetooth (16)
Bugs/Recalls (56)
Cult of Mac (870)
Deals (216)
Desktops (115)
Developer (254)
Education (99)
eMac (10)
Enterprise (138)
Features (400)
Freeware (385)
Gaming (363)
Graphic Design (33)
Hardware (1281)
Holidays (37)
Humor (576)
iBook (65)
iLife (235)
iMac (184)
Internet (327)
Internet Tools (1313)
iTS (968)
iTunes (800)
iWork (22)
Leopard (367)
Mac mini (112)
Mac Pro (53)
MacBook (202)
MacBook Air (79)
Macbook Pro (220)
MobileMe (19)
Multimedia (443)
Odds and ends (1443)
Open Source (279)
OS (912)
Peripherals (208)
Podcasting (182)
Podcasts (90)
Portables (197)
PowerBook (135)
PowerMac G5 (50)
Retail (588)
Retro Mac (48)
Rig of the Week (42)
Rumors (632)
Software (4322)
Software Update (406)
Steve Jobs (252)
Stocking Stuffers (50)
Surveys and Polls (97)
Switchers (112)
The Woz (34)
TUAW Business (238)
Universal Binary (281)
UNIX / BSD (61)
Video (904)
Weekend Review (82)
WIN Business (47)
Wireless (84)
Xserve (39)
iPhone/iPod News
iPhone (1515)
iPod Family (2028)
App Store (27)
SDK (16)
Mac Events
One More Thing (27)
Liveblog (1)
Other Events (226)
Macworld (489)
Mac Learning
AppleScript (3)
Ask TUAW (102)
Blogs (85)
Books (26)
Books and Blogs (62)
Cool tools (443)
Hacks (460)
How-tos (485)
Interviews (44)
Mods (186)
Productivity (588)
Reviews (109)
Security (154)
Terminal Tips (58)
Tips and tricks (565)
Troubleshooting (167)
TUAW Features
iPhone 101 (27)
TUAW Labs (3)
Blast From the Past (17)
TUAW Tips (142)
Flickr Find (36)
Found Footage (82)
Mac 101 (90)
TUAW Interview (31)
Widget Watch (198)
The Daily Best (1)
TUAW Faceoff (4)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Sponsored Links

The Unofficial Apple Weblog (TUAW) bloggers (30 days)

#BloggerPostsCmts
1Cory Bohon891
2Robert Palmer6444
3Steven Sande5822
4Scott McNulty400
5Mat Lu4010
6Dave Caolo370
7Erica Sadun282
8Brett Terpstra230
9Mike Schramm201
10Michael Rose1132
11Christina Warren1038
12Joshua Ellis32
13Chris Ullrich22
14Lisa Hoover26

Featured Galleries

Macworld 2008 Keynote
Macworld 2008 Build-up
Apple Vanity Plates
DiscPainter
Macworld Expo 2007 show floor
The Macworld Faithful in Line
iPhone First Look
AT&T 3G Coverage Map
MobileMe Guided Tour UI Changes

 

    Most Commented On (7 days)

    Recent Comments

    More Apple Analysis

    More from AOL Money and Finance

    Weblogs, Inc. Network

    Other Weblogs Inc. Network blogs you might be interested in: