Automator, a powerful scripting workflow tool added to Mac OS X with Tiger (10.4) allows you to create your own context menus for many things. Today I’m going to demonstrate how easy it is to make a workflow for sending selected files to a new mail message.
There are a few good books on Automator, but unfortunately the best one hasn’t been updated since 10.6.
- Automator for Mac OS X 10.6 Snow Leopard: Visual QuickStart Guide by Ben Waldie - by the way, Ben Waldie is deserving of his Twitter name, @applescriptguru. Check him out there and at his company, automatedworkflows.com. He offers Automator Action Packs in the Mac App Store that are great for common needs of users, with special enhancements for Lion and Mountain Lion.Here’s the link to his File and Folder Automator Action Pack.
- Master Your Mac: Simple Ways to Tweak, Customize and Secure OS X by Matt Cone is another great reference. While it doesn’t focus on automation primarily, it has great examples for using AppleScript and Automator to make managing your Mac effortless and the book is new (December 2012).
Update from Ben Waldie:
http://www.automatedworkflows.com/tips/
http://www.macworld.com/author/Ben-Waldie/
http://www.tuaw.com/editor/ben-waldie
These are links he’s provided to make your learning even easier. Great guy - if you need consulting help, please use his company!
Obviously, Google is a great place for tips and tricks with Automator too.
Steps:
Launch Automator
Choose Service
Where you see Service receives selected … in … make the selections as shown below:
Add New Mail Message to the Workflow
You can find this by clicking Mail under Library and navigating the list or simply by typing New Mail Message in the Name search box.
To add the New Mail Message Action, drag it from the list into the open space. You should see something like the image below.
For my purposes, I chose a specific account to mail from, plus added a little text that says:
This email contains attached files. These files are confidential and intended solely for the use of the individual(s) or entity to whom they are addressed. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.
Unfortunately, I found that the font did not stay set right when I used this workflow. I hope to resolve that and update this blog post in the future.
Save the Service with an easy name like Attach to New Mail Message
To do this, simply go to the File menu and choose Save or hit CMD + S.
Note: you will not get a folder option for where to save your new Service. This is because Services created in Automator default to the home directory -> Library -> Services folder.
Test Service on Menu
To use this new Service that you just created, simply go to any file or folder and right-click, select Services then Attach to New Mail Message:
You should see something like this:
BOOM! You just wrote a Service and it works! Imagine the possibilities! Mac OS X is a great platform for many reasons, but the ability to automate tasks is often overlooked or completely unknown!
Enjoy!
More updates:
- Dragging a file or group of files to the Mail icon on the dock will create a new message with the file(s) as attachment(s).
- IF you have the Share button on your Finder toolbar, you can use that to send a file by email.
Another low-cost resource for AppleScript help is Alexander Woodall and he makes great software for automation such as AppleScriptObjC Explorer and even offers free utilities like the ones found here.
No comments:
Post a Comment