<?xml version="1.0"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>TUAW - The Unofficial Apple Weblog</title><link>http://www.tuaw.com</link><description>TUAW - The Unofficial Apple Weblog</description><image><url>http://www.blogsmithmedia.com/www.tuaw.com/media/feedlogo.gif</url><title>TUAW - The Unofficial Apple Weblog</title><link>http://www.tuaw.com</link></image><language>en-us</language><copyright>Copyright 2013 Weblogs, Inc. The contents of this feed are available for non-commercial use only.</copyright><generator>Blogsmith http://www.blogsmith.com/</generator><item><title>Adding copy-to-clipboard rollovers in Contacts app via AppleScript</title><link>http://www.tuaw.com/2013/04/29/adding-copy-to-clipboard-rollovers-in-contacts-app-via-applescri/</link><guid isPermaLink="true">http://www.tuaw.com/2013/04/29/adding-copy-to-clipboard-rollovers-in-contacts-app-via-applescri/</guid><comments>http://www.tuaw.com/2013/04/29/adding-copy-to-clipboard-rollovers-in-contacts-app-via-applescri/#comments</comments><description><![CDATA[<p><img alt="Adding Copy to Clipboard Rollovers in Contacts App via AppleScript" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/contactsscript.png" style="margin: 4px; float: right; " />Apple's Contacts app includes a lot of great shortcuts for initiating different forms of communication. Just click an email address, phone number or URL field label to display a list of available options. You can send an email, show a phone number in large type or start a FaceTime call, for example. Curiously, one shortcut that's absent from most of these popups is one for copying the email address, phone number, URL, etc. to the clipboard. Mailing addresses are one exception, as they provide an option to copy a mailing label. But, other fields don't include this option. Sure, you could just select a phone number, email address, URL, etc., and press <em>Command+C</em> to copy it. But, what fun is that? It sure would be nice if there were just more handy copy-to-clipboard shortcuts instead. With the help of AppleScript, you can add your own. Here's how...</p>

<p><strong>Writing the Script</strong></p>

<p>The following steps demonstrate how to add a <em>Copy to Clipboard</em> shortcut to phone number fields in the Contacts app. If you have any trouble following along, you can download the complete script <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-04-28-TUAW_Waldie.zip">here</a>, along with ones for email address and URL fields too.</p>

<p><strong>1.</strong> Launch AppleScript Editor (in <em>/Applications/Utilities</em>)</p>

<p><strong>2.</strong> Create a new script document and enter the following code:</p>

<p><script src="https://gist.github.com/benwaldie/5479217.js"></script></p>

<p><strong>Note:</strong> If you want to create a version of this script for email address or URL fields, just change the action property handler to return the appropriate field type, i.e.,</p>

<blockquote>
<p>on action property<br />
return "email"<br />
end action property</p>
</blockquote>

<p>or...</p>

<blockquote>
<p>on action property<br />
return "url"<br />
end action property</p>
</blockquote>

<p><strong>Installing and Using the Script</strong></p>

<p>In order for the script you created to appear in the Contacts app, it needs to be saved in the proper place.</p>

<p><strong>1.</strong> Quit Contacts if it's running.</p>

<p><strong>2.</strong> Save the script you created as <em>Contacts &gt; Copy Phone to Clipboard.scpt</em>, in script format, into the <em>~/Library/Address Book Plug-Ins</em> folder in your Home directory. If this folder doesn't already exist, go ahead and create it.</p>

<p style="text-align: center; "><img alt="Adding Copy to Clipboard Rollovers in Contacts App via AppleScript" data-src-height="312" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-28-waldie-01.png" style="margin:4px" /></p>

<p>Now, just relaunch the Contacts app. When you click on a phone number field label, you should see a new option for copying the phone number to the clipboard. Now, repeat the steps above for email addresses and URLs to enhance the Contacts app even further.</p>

<p style="text-align: center; "><img alt="Adding Copy to Clipboard Rollovers in Contacts App via AppleScript" data-src-height="416" data-src-width="441" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-28-waldie-02.png" style="margin:4px" /></p>

<p>This marks my last scheduled post for the TUAW for a bit. Hopefully, you'll see more of me here in the future. In the meantime, feel free to reach out to me on <a href="https://twitter.com/applescriptguru">Twitter</a> to say "Hello," ask a scripting question or two, suggest a future topic, etc. Until next time, Happy Scripting!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/04/29/adding-copy-to-clipboard-rollovers-in-contacts-app-via-applescri/">Adding copy-to-clipboard rollovers in Contacts app via AppleScript</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 29 Apr 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/04/29/adding-copy-to-clipboard-rollovers-in-contacts-app-via-applescri/">Adding copy-to-clipboard rollovers in Contacts app via AppleScript</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 29 Apr 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/04/29/adding-copy-to-clipboard-rollovers-in-contacts-app-via-applescri/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20551049/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/04/29/adding-copy-to-clipboard-rollovers-in-contacts-app-via-applescri/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>address book</category><category>AddressBook</category><category>applescript</category><category>clipboard</category><category>contacts</category><category>copy</category><category>productivity</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 29 Apr 2013 07:00:00 EST</pubDate></item><item><title>Extract App Resource Icons with AppleScript</title><link>http://www.tuaw.com/2013/04/22/extract-app-resource-icons-with-applescript/</link><guid isPermaLink="true">http://www.tuaw.com/2013/04/22/extract-app-resource-icons-with-applescript/</guid><comments>http://www.tuaw.com/2013/04/22/extract-app-resource-icons-with-applescript/#comments</comments><description><![CDATA[<p>
	<img alt="Extract App Resource Icons with AppleScript" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/script.png" style="margin: 4px; float: right; " />Whether I'm preparing for a demo or writing an article, blog post, book, or technical documentation, I often find myself performing the same set of repetitive steps. I need to navigate into an app's packaged resources folder, find one or more icon files, occasionally convert them to PNG and scale them, and add them to my document, Keynote presentation, etc. Fortunately, this doesn't need to be a manual process each time, thanks to the following AppleScript.</p>
<p>
	<strong>Creating the Script</strong></p>
<p>
	<strong>1.</strong> Launch AppleScript Editor (in <em>/Applications/Utilities</em>) and create a new script document.</p>
<p>
	<strong>2.</strong> Enter the following script into the document.</p>
<p>
	<em>NOTE: If you have any trouble following along, you can download the completed script <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-04-21-TUAW_Waldie.zip">here</a>.</em></p>
<p>
<script src="https://gist.github.com/benwaldie/5431981.js"></script></p>
<p>
	<strong>3.</strong> Run the script from AppleScript Editor, save it as an app, or add it to your script menu.</p>
<p>
	<strong>Running the Script</strong></p>
<p>
	When you run the script, you're first asked to select an app from which to extract icons. Make your selection and click <em>Choose</em>.</p>
<p style="text-align: center; ">
	<img alt="Extract App Resource Icons with AppleScript" data-src-height="331" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-21-waldie-01.png" style="margin:4px" /></p>
<p>
	The script looks inside the app's <em>/Contents/Resource</em>s folder for any files with an extension of <em>.icns</em>. If multiple files are found, it allows you to select the ones you want to extract. The default is all of them.</p>
<p style="text-align: center; ">
	<img alt="Extract App Resource Icons with AppleScript" data-src-height="341" data-src-width="366" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-21-waldie-02.png" style="margin:4px" /></p>
<p>
	Next, the script gives you the option to extract the <em>.icns</em> files themselves, or <em>PNG</em> versions. Click the button to make your choice.</p>
<p style="text-align: center; ">
	<img alt="Extract App Resource Icons with AppleScript" data-src-height="199" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-21-waldie-03.png" style="margin:4px" /></p>
<p>
	If you click the <em>PNG</em> button, then you're given a choice of sizes to create. You might not need the full sized icons, for example. You might only need 256x256 icons.</p>
<p style="text-align: center; ">
	<img alt="Extract App Resource Icons with AppleScript" data-src-height="341" data-src-width="366" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-21-waldie-04.png" style="margin:4px" /></p>
<p>
	Depending on the options you chose, the script extracts the <em>.icns</em> files, or it converts the <em>.icns</em> files to <em>PNG</em> and scales them, as needed. You're notified when the icons have been extracted, and they're displayed in the Finder for you. Now you can simply drag them to your document, presentation, file, etc., and you're good to go! Happy Scripting!</p>
<p style="text-align: center; ">
	<img alt="Extract App Resource Icons with AppleScript" data-src-height="199" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-21-waldie-05.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<img alt="Extract App Resource Icons with AppleScript" data-src-height="312" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-21-waldie-06.png" style="margin:4px" /></p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/04/22/extract-app-resource-icons-with-applescript/">Extract App Resource Icons with AppleScript</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 22 Apr 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/04/22/extract-app-resource-icons-with-applescript/">Extract App Resource Icons with AppleScript</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 22 Apr 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/04/22/extract-app-resource-icons-with-applescript/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20546524/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/04/22/extract-app-resource-icons-with-applescript/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>documents</category><category>finder</category><category>icon</category><category>icons</category><category>images</category><category>keynote</category><category>mountain lion</category><category>MountainLion</category><category>os x</category><category>OsX</category><category>presentations</category><category>scripting</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 22 Apr 2013 07:00:00 EST</pubDate></item><item><title>AppleScripting OmniFocus > Send completed task report to Evernote 2</title><link>http://www.tuaw.com/2013/04/15/applescripting-omnifocus-send-completed-task-report-to-evernot/</link><guid isPermaLink="true">http://www.tuaw.com/2013/04/15/applescripting-omnifocus-send-completed-task-report-to-evernot/</guid><comments>http://www.tuaw.com/2013/04/15/applescripting-omnifocus-send-completed-task-report-to-evernot/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote 2" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/ofocusscript.png" style="margin: 4px; float: right; " />In February, I provided <a href="http://www.tuaw.com/2013/02/18/applescripting-omnifocus-send-completed-task-report-to-evernot/">instructions</a> for using AppleScript to send completed task reports from OmniFocus to Evernote. The script was quite well-received by readers, and I've had numerous requests for enhancements. This post provides an updated version of the script, which includes a number of additions. The script now supports full project paths and additional task details including the context, estimated time, start date, modification date, completion date and notes. This additional content is optional, and you can adjust the script to not display it if you wish.</p>
<p>
	<strong>Creating the Script</strong></p>
<p>
	<em>NOTE: You can download my completed script <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-04-12-TUAW_Waldie.zip">here</a>.</em></p>
<p>
	<strong>1.</strong> Launch AppleScript Editor (in <em>/Applications/Utilities</em>)</p>
<p>
	<strong>2.</strong> Create a new script document and enter the following code:</p>
<p>
<script src="https://gist.github.com/benwaldie/5374004.js"></script></p>
<p>
	<strong>3.</strong> At the top of the script, you can adjust various properties to customize the information that's displayed in the report. Just change any of these property values to <em>false</em> to prevent them from appearing.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote 2" data-src-height="128" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-12-waldie-01.png" style="margin:4px" /></p>
<p>
	<strong>Running the Script</strong></p>
<p>
	You can run the script right from within AppleScript Editor. Or, you can save it and run it from your system-wide script menu, your Dock or wherever else you'd like. When the script runs, just specify the date range you want to include.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote 2" data-src-height="324" data-src-width="366" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-12-waldie-02.png" style="margin:4px" /></p>
<p>
	The script then creates a report for any tasks completed within that specified range in your Evernote Inbox.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote 2" data-src-height="450" data-src-width="398" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-12-waldie-03.png" style="margin:4px" /></p>
<p>
	Now, you can quickly generate much more detailed reports of your recently completed OmniFocus activity simply by running the script. Happy Scripting!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/04/15/applescripting-omnifocus-send-completed-task-report-to-evernot/">AppleScripting OmniFocus > Send completed task report to Evernote 2</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 15 Apr 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/04/15/applescripting-omnifocus-send-completed-task-report-to-evernot/">AppleScripting OmniFocus > Send completed task report to Evernote 2</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 15 Apr 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/04/15/applescripting-omnifocus-send-completed-task-report-to-evernot/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20540301/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/04/15/applescripting-omnifocus-send-completed-task-report-to-evernot/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>evernote</category><category>omnifocus</category><category>productivity</category><category>scripting</category><category>tasks</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 15 Apr 2013 07:00:00 EST</pubDate></item><item><title>AppleScripting Email > Developing a Quoted Reply Service</title><link>http://www.tuaw.com/2013/04/08/applescripting-email-developing-a-quoted-reply-service/</link><guid isPermaLink="true">http://www.tuaw.com/2013/04/08/applescripting-email-developing-a-quoted-reply-service/</guid><comments>http://www.tuaw.com/2013/04/08/applescripting-email-developing-a-quoted-reply-service/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting Email  Developing a Quoted Reply Service" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/outlookauto.png" style="margin: 4px; float: right; " />A reader recently wrote to me with a problem. Apparently, Microsoft Outlook no longer contains the ability to create quote level chunks of text when replying to messages in plain text format. Why this functionality was removed, I can't say. But, with a little help from AppleScript and Automator, I was able to help the reader to add this functionality back via a Service. Better yet, the Service can be set up to work in any email client, or even system-wide in any app. Here's how you can do it...</p>
<p>
	<strong>Building the Service</strong></p>
<p>
	<strong>1.</strong> Launch Automator (in <em>/Applications</em>) and create a new Service workflow.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Email  Developing a Quoted Reply Service" data-src-height="436" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-02-waldie-01.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Creating a Service workflow in Automator</em></p>
<p>
	<strong>2.</strong> Configure the workflow (at the top) to process selected text in any application, or your favorite email client, such as Mail or Outlook. Then, select the "Output replaces selected text" checkbox.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Email  Developing a Quoted Reply Service" data-src-height="44" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-02-waldie-02.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>In this screenshot, the Service is set to appear only in the Outlook app.</em></p>
<p>
	<strong>3.</strong> Find and add the Run AppleScript action to the workflow. It should link up with the header, indicating that it receives text as input. Enter the following script into the action.</p>
<p>
	<em>Note: If you get stuck, you can download the completed script and workflow <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-03-31-TUAW_Waldie.zip">here</a>.</em></p>
<p>
<script src="https://gist.github.com/benwaldie/5320770.js"></script></p>
<p style="text-align: center; ">
</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Email  Developing a Quoted Reply Service" data-src-height="450" data-src-width="406" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-02-waldie-03.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Example of the completed workflow</em></p>
<p>
	<strong>4.</strong> The script above is set to limit lines to a maximum of 42 characters. If you want longer lines, go ahead and adjust this in the script. Just set the theMaxLineLength variable to the desired length. Also, note that this is a guideline. The script tries not to break words in the middle. So, if an extra long word is encountered, you may still have lines longer than the maximum length.</p>
<p>
	<strong>5.</strong> Save the workflow as <em>Email &gt; Quote Selected Text</em>. Automator puts it where it needs to go.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Email  Developing a Quoted Reply Service" data-src-height="116" data-src-width="355" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-02-waldie-04.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Saving the Service workflow</em></p>
<p>
	<strong>Using the Service</strong></p>
<p>
	Now, anytime you're in your email app and want to create quoted text in a plain text message, just select the desired text. Right-click it (or Option+Click it) to display the contextual menu. Then, select <em>Services &gt; Email &gt; Quote Selected Text</em>. Again, this is intended for plain text messages. It will probably generate inconsistent results with HTML formatted text.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Email  Developing a Quoted Reply Service" data-src-height="450" data-src-width="412" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-02-waldie-05.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Triggering the workflow from the Services contextual menu in Outlook to process selected text in a message</em></p>
<p>
	If you don't see the Services menu in the contextual menu, then whatever app you're using may not support contextual Services. In this case, try triggering the workflow from the <em>App &gt; Services</em> menu instead.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Email  Developing a Quoted Reply Service" data-src-height="205" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-02-waldie-06.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Triggering the workflow from the Application &gt; Services menu</em></p>
<p>
	If all goes well, your selected text is passed to the Service workflow, and the processed quoted text is inserted. Happy Scripting!</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Email  Developing a Quoted Reply Service" data-src-height="450" data-src-width="357" src="http://www.blogcdn.com/www.tuaw.com/media/2013/04/2013-04-02-waldie-07.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>A message containing processed text</em></p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/04/08/applescripting-email-developing-a-quoted-reply-service/">AppleScripting Email > Developing a Quoted Reply Service</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 08 Apr 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/04/08/applescripting-email-developing-a-quoted-reply-service/">AppleScripting Email > Developing a Quoted Reply Service</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 08 Apr 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/04/08/applescripting-email-developing-a-quoted-reply-service/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20531962/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/04/08/applescripting-email-developing-a-quoted-reply-service/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>email</category><category>entourage</category><category>mail</category><category>outlook</category><category>service</category><category>text</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 08 Apr 2013 08:00:00 EST</pubDate></item><item><title>AppleScripting Microsoft Outlook > Announce New Emails By Voice</title><link>http://www.tuaw.com/2013/04/01/applescripting-microsoft-outlook-announce-new-emails-by-voice/</link><guid isPermaLink="true">http://www.tuaw.com/2013/04/01/applescripting-microsoft-outlook-announce-new-emails-by-voice/</guid><comments>http://www.tuaw.com/2013/04/01/applescripting-microsoft-outlook-announce-new-emails-by-voice/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/outlookscript.png" style="margin: 4px; float: right; " />In my <a href="http://www.tuaw.com/2013/03/25/applescripting-mail-announce-new-emails-by-voice/">last post</a>, I demonstrated how to write an AppleScript that verbally announces when new emails arrive in Mail. Some readers asked whether the same thing could be accomplished with Microsoft Outlook. It certainly can. Here's how...</p>
<p>
	<strong>Creating and Installing the Script</strong></p>
<p>
	<strong>1.</strong> Launch AppleScript Editor (in <em>/Applications/Utilities</em>) and create a new script document.</p>
<p>
	<strong>2.</strong> Enter the following script into the document.</p>
<p>
	<em>NOTE: If you have any trouble following along, you can download the completed script <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-03-31-TUAW_Waldie.zip">here</a>.</em></p>
<p>
<script src="https://gist.github.com/benwaldie/5282932.js"></script></p>
<p>
	<em>NOTE: This script was written and tested with Microsoft Outlook 2011, version 14.3.2, running in OS X 10.8.3, Mountain Lion. You can test the script by running it in AppleScript Editor. Select a message or two in Outlook. Then, return to AppleScript Editor and click Run in the script document's window.</em></p>
<p>
	<strong>3.</strong> Make any adjustments to the properties at the top of the script to customize its behavior. For example, if you don't want the script to raise your volume if it's too low, change the <em>raiseVolumeIfNeeded</em> property value to false. If you don't want the script to read the first few paragraphs of each message to you, set the <em>readFirstParagraphsOfEachMessage</em> property value to false.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="202" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-31-waldie-01.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Modifiable Properties in the Script</em></p>
<p>
	<strong>4.</strong> Save the script in Script format to your Desktop as <em>Outlook &gt; Announce New Emails By Voice.scpt</em>.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="373" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-31-waldie-02.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Saving the script to the Desktop</em></p>
<p>
	<strong>5.</strong> Launch Outlook. From its script menu, choose <em>About This Menu...</em> In the dialog that appears, click <em>Open Folder</em>. This opens the <em>Outlook Script Menu Items</em> folder, which is either in your <em>~Documents/Microsoft User Data</em> folder or your <em>~/Library/Application Support/Microsoft/Office</em> folder, depending on the version of Office you have installed.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="229" data-src-width="346" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-31-waldie-03.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>The Microsoft Outlook Script Menu</em></p>
<p style="text-align: center; ">
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="277" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-31-waldie-04.png" style="margin: 4px; " /></p>
<p style="text-align: center; ">
	<em>Click the Open Folder button to display the Outlook Script Menu Items folder.</em></p>
<p>
	<strong>6.</strong> Move the <em>Outlook &gt; Announce New Emails By Voice.scpt</em> file from your desktop into the <em>Outlook Script Menu Items</em> folder.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="312" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-31-waldie-05.png" style="margin: 4px; " /></p>
<p style="text-align: center; ">
	<em>The Outlook Script Menu Items folder may contain some default scripts provided by Microsoft.</em></p>
<p>
	<strong>Adding an Email Rule</strong></p>
<p>
	Now that you've installed the script, you can run it from the script menu in Outlook. But, you really want a script like this to run automatically when new emails arrive. So, you need to configure a rule to do this.</p>
<p>
	<strong>1.</strong> Select <em>Tools &gt; Rules...</em> to display the <em>Rules</em> window.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="330" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-31-waldie-06.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Outlook's Rules window</em></p>
<p>
	<strong>2.</strong> Click the appropriate type of account, i.e. <em>Exchange</em>, <em>IMAP</em>, <em>POP</em>, and click the <em>+</em> button to create a new rule.</p>
<p>
	<strong>3.</strong> Name the rule <em>Announce New Emails By Voice</em> and set it to trigger on <em>All Messages</em>. Set the rule's action to <em>Run AppleScript</em>. Click the <em>Script...</em> button and choose your saved script in the <em>Outlook Script Menu Items</em> folder. Click <em>OK</em> to close the rule.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="330" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-31-waldie-07.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>The configured rule, set to run your script</em></p>
<p>
	Now, whenever a new email arrives for the specified type of account, the rule should trigger your script to announce the new messages. If you want to disable the announcements at any time, just go back to the Rules window and de-select the <em>Enabled</em> checkbox next to the rule. Happy scripting!</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Microsoft Outlook  Announce New Emails By Voice" data-src-height="330" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-31-waldie-08.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>You can disable the announcement script in the Rules window whenever you want</em></p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/04/01/applescripting-microsoft-outlook-announce-new-emails-by-voice/">AppleScripting Microsoft Outlook > Announce New Emails By Voice</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 01 Apr 2013 10:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/04/01/applescripting-microsoft-outlook-announce-new-emails-by-voice/">AppleScripting Microsoft Outlook > Announce New Emails By Voice</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 01 Apr 2013 10:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href=http://www.tuaw.com/tag/applescript>Read</a> | <a href="http://www.tuaw.com/2013/04/01/applescripting-microsoft-outlook-announce-new-emails-by-voice/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20524306/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/04/01/applescripting-microsoft-outlook-announce-new-emails-by-voice/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>audio</category><category>email</category><category>mail</category><category>microsoft</category><category>outlook</category><category>voice</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 01 Apr 2013 10:00:00 EST</pubDate></item><item><title>Talking to Siri: Remote-controlling your Mac by voice with Siri Listener</title><link>http://www.tuaw.com/2013/03/27/talking-to-siri-remote-controlling-your-mac-by-voice-with-siri/</link><guid isPermaLink="true">http://www.tuaw.com/2013/03/27/talking-to-siri-remote-controlling-your-mac-by-voice-with-siri/</guid><comments>http://www.tuaw.com/2013/03/27/talking-to-siri-remote-controlling-your-mac-by-voice-with-siri/#comments</comments><description><![CDATA[<p style="text-align:center;padding:0;margin:0 0 10px 0">
	<img alt="" border="0" height="300" src="http://www.blogcdn.com//media/2013/03/sirilistenerheader.jpg" width="400" /></p>
<p>
	In this episode of "Stupid Siri Tricks," I make my iOS devices control a remote Mac. How remote? Well, it should work anywhere on the planet (or off, if you happen to be on the <a href="http://www.nasa.gov/mission_pages/station/main/">International Space Station</a>) with Wi-Fi or a cellular data connection. If you can take a note with Siri, you can make your Mac do your bidding from wherever you may be.</p>
<p>
	I was inspired to do this after watching <a href="http://nilesmitchell.com/mac-512k.html">a video by Niles Mitchell</a> in which he uses a 512K Mac with the original Mac Speak application to issue a command to Siri, which then set a chain of events into motion resulting in some files being moved from that ancient Mac to Dropbox.</p>
<p>
	It occurred to me that he was using the Notes application and iCloud to accomplish all of this. Essentially, you tell Siri to "Write a note", after which you dictate a note and it is synced to all of your devices through iCloud. The lightbulb went on, so I wrote a quick little application in AppleScript to wait for certain notes to appear and then perform actions on the Mac.</p>
<p>
	One of the more useful things I could think of was the ability to shut down my Mac or at least put it to sleep if I forgot to do so before going on a trip, so I set up my application to look for "Shut down" or "Go to sleep" notes to perform either of those actions. Perhaps I want to do a remote restart? All I have to do is tell Siri "Restart my mac" and it happens. I also built in the ability to see what apps are currently running on my Mac and return them to my iPhone or iPad in another note. The possibilities are endless...</p>
<p>
	To use this little "Siri Listener" app, just copy the code below and paste it into a blank AppleScript Editor page. Save the code in case you want to add your own customizations at some point, and then Export as an Application, making sure that you check the boxes for "Stay open after run handler" and "Run-only". To make sure your Siri Listener is always available for your commands, make sure you set it to run at startup.</p>
<script src="https://gist.github.com/anonymous/5257483.js"></script><p>
	Make sure that you know how to use Siri to take notes. Just press the home button on your favorite iOS device, wait for the Siri prompt, and then say "Write a note". Siri responds with some sort of question about what you want the note to say, after which you can speak the appropriate command.</p>
<p>
	Note that I wasn't thinking clearly when I wrote my initial script -- I actually have to say "What apps are running question mark" to get the note in the proper format for Siri Listener to act upon. I'm probably going to change it to something more generic like "List my mac apps" to avoid the punctuation.</p>
<p>
	I was really wishing that the Photo Booth app was scriptable, as it would be possible to have the Mac's camera take a picture and then attach it to a Note for you to view. I can also see that the Siri Listener idea could be the perfect tool for playing pranks on unsuspecting co-workers, but of course <em>you</em> wouldn't do that...</p>
<p>
	Have fun! And if you come up with some fun and/or productive uses for the Siri Listener, let me know in the comments. Want more Siri tips? There's a <a href="http://www.amazon.com/Talking-Siri-Learning-Intelligent-Assistant/dp/0789750694">book for that</a>.</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/03/27/talking-to-siri-remote-controlling-your-mac-by-voice-with-siri/">Talking to Siri: Remote-controlling your Mac by voice with Siri Listener</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Wed, 27 Mar 2013 20:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/03/27/talking-to-siri-remote-controlling-your-mac-by-voice-with-siri/">Talking to Siri: Remote-controlling your Mac by voice with Siri Listener</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Wed, 27 Mar 2013 20:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href=http://tuaw.com/tag/talkingtosiri>Read</a> | <a href="http://www.tuaw.com/2013/03/27/talking-to-siri-remote-controlling-your-mac-by-voice-with-siri/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20520368/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/03/27/talking-to-siri-remote-controlling-your-mac-by-voice-with-siri/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>control</category><category>features</category><category>hack</category><category>iOS</category><category>iPad</category><category>iPhone</category><category>Mac</category><category>productivity</category><category>remote</category><category>siri</category><category>siri listener</category><category>SiriListener</category><category>talking to siri</category><category>TalkingToSiri</category><dc:creator>Steven Sande</dc:creator><pubDate>Wed, 27 Mar 2013 20:00:00 EST</pubDate></item><item><title>AppleScripting Mail > Announce New Emails By Voice</title><link>http://www.tuaw.com/2013/03/25/applescripting-mail-announce-new-emails-by-voice/</link><guid isPermaLink="true">http://www.tuaw.com/2013/03/25/applescripting-mail-announce-new-emails-by-voice/</guid><comments>http://www.tuaw.com/2013/03/25/applescripting-mail-announce-new-emails-by-voice/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting Mail  Announce New Emails By Voice" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/mailscript.png" style="margin: 4px; float: right; " />You're in the kitchen cooking dinner, or sitting down watching TV, or exercising. Ding! You have a new email. Quickly, run to your Mac to see who it's from. Meh, spam. Ding! Meh, a message from your boss. Ding! Meh. Sure would be nice if Mail could announce who's emailing you. That way, you could just listen for ones you care about. Well, with the help of AppleScript and Mail rules, you can set this up on your own. Think of it as an audible caller ID, but for email.</p>
<p>
	<strong>Setting It Up</strong></p>
<p>
	<strong>1.</strong> Launch AppleScript Editor (in <em>/Applications/Utilities</em>) and create a new script document.</p>
<p>
	<strong>2.</strong> Enter the following script into the document.</p>
<p>
	<em>NOTE: if you have any trouble following along, you can download the completed script <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-03-22-TUAW_Waldie.zip">here</a>.</em></p>
<p>
<script src="https://gist.github.com/benwaldie/5223052.js"></script></p>
<p>
	<em>NOTE: If you wish to test the script, which is always a good idea, you can do so by running it in AppleScript Editor. Just select a message or two in Mail. Then, return to AppleScript Editor and click Run in the script document's window.</em></p>
<p>
	<strong>3.</strong> Make any adjustments to the properties at the top of the script to customize its behavior. For example, if you don't want the script to raise your volume if it's too low, change the <em>raiseVolumeIfNeeded</em> property value to false. If you don't want the script to read the first few paragraphs of each message to you, set the <em>readFirstParagraphsOfEachMessage</em> property value to false.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Mail  Announce New Emails By Voice" data-src-height="206" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-24-waldie-01.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Modifiable Properties in the Script</em></p>
<p>
	<strong>4.</strong> Save the script in <em>Script</em> format to your Desktop as <em>Mail &gt; Announce New Emails By Voice.scpt</em>.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Mail  Announce New Emails By Voice" data-src-height="373" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-24-waldie-02.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Saving the script to the Desktop</em></p>
<p>
	<strong>5.</strong> Launch Mail, open its Preferences window, and click <em>Rules</em> in the toolbar.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Mail  Announce New Emails By Voice" data-src-height="286" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-24-waldie-03.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Mail's Rule Preferences window</em></p>
<p>
	<strong>6.</strong> Click <em>Add Rule</em> to create a Mail rule.</p>
<p>
	<strong>7.</strong> Set the rule's description to <em>Announce New Emails by Voice</em>.</p>
<p>
	<strong>8.</strong> Set the rule to trigger if <em>any</em> of the following conditions are met: Account matches <em>[Your Account]</em><your account="">. If you have multiple accounts, click <em>+</em> and add each one.</your></p>
<p>
	<strong>9.</strong> Set the rule to perform the following action: <em>Run AppleScript</em>. From the list of scripts, choose <em>Open in Finder</em>.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Mail  Announce New Emails By Voice" data-src-height="282" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-24-waldie-04.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Configuring the Mail rule</em></p>
<p>
	<strong>10.</strong> Copy the Announce New Emails By Voice.scpt script file from your desktop into the newly opened folder (this folder is <em>~/Library/Application Scripts/com.apple.mail</em> in Mountain Lion).</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Mail  Announce New Emails By Voice" data-src-height="299" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-24-waldie-05.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Mail's rule scripts folder in Mountain Lion (in ~/Library/Application Scripts)</em></p>
<p>
	<strong>11.</strong> Go back to Mail and close and save the rule.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Mail  Announce New Emails By Voice" data-src-height="286" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-24-waldie-06.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>The configured Mail rule, set to run the script</em></p>
<p>
	Now, whenever a new message arrives for the accounts you specified, the rule should trigger the script, and the messages should be announced audibly. If you get tired of listening to the announcements or want to mute them, just open up Mail's <em>Preferences &gt; Rules</em> window again and de-select the <em>Active</em> checkbox next to the rule. Happy Scripting!</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Mail  Announce New Emails By Voice" data-src-height="286" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-24-waldie-07.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>You can disable the Mail rule by de-selecting the Action checkbox</em></p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/03/25/applescripting-mail-announce-new-emails-by-voice/">AppleScripting Mail > Announce New Emails By Voice</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 25 Mar 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/03/25/applescripting-mail-announce-new-emails-by-voice/">AppleScripting Mail > Announce New Emails By Voice</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 25 Mar 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href=http://www.tuaw.com/tag/applescript>Read</a> | <a href="http://www.tuaw.com/2013/03/25/applescripting-mail-announce-new-emails-by-voice/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20516197/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/03/25/applescripting-mail-announce-new-emails-by-voice/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>email</category><category>mail</category><category>productivity</category><category>rules</category><category>speech</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 25 Mar 2013 08:00:00 EST</pubDate></item><item><title>Triggering AppleScripts from Calendar Alerts in Mountain Lion</title><link>http://www.tuaw.com/2013/03/18/triggering-applescripts-from-calendar-alerts-in-mountain-lion/</link><guid isPermaLink="true">http://www.tuaw.com/2013/03/18/triggering-applescripts-from-calendar-alerts-in-mountain-lion/</guid><comments>http://www.tuaw.com/2013/03/18/triggering-applescripts-from-calendar-alerts-in-mountain-lion/#comments</comments><description><![CDATA[<p>
	<img alt="Triggering AppleScripts from Calendar Alerts in Mountain Lion" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/calendarscript.png" style="margin: 4px; float: right; " />AppleScripts are great tools for increasing your daily productivity. They're even better when they can be set to run unattended, at night, on weekends or during downtime. In Lion, iCal included a handy option for attaching a script to a calendar event. Just create an event, add a Run Script alarm, point it to the desired script and you're good to go. Things changed in Mountain Lion, though. Presumably for security reasons, the Run Script alarm option was removed from the Calendar app. Despite its removal, however, there are still some ways you can trigger scripts from Calendar events.</p>
<p style="text-align: center; ">
	<img alt="Triggering AppleScripts from Calendar Alerts in Mountain Lion" data-src-height="395" data-src-width="326" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-17-waldie-01.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>iCal event alarm choices in OS X 10.7 Lion</em></p>
<p style="text-align: center; ">
	<img alt="Triggering AppleScripts from Calendar Alerts in Mountain Lion" data-src-height="371" data-src-width="362" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-17-waldie-02.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Calendar event alarm choices in OS X 10.8 Mountain Lion</em></p>
<p>
	<strong>Use Automator to Trigger Your AppleScript</strong></p>
<p>
	Although Apple removed the Run Script alarm option in the Calendar app, Automator's ability to save Calendar Alarm workflows wasn't removed. And, since Automator workflows can trigger AppleScripts, they offer a quick and easy workaround for scheduling scripts. Start by launching Automator and creating a new Calendar Alarm workflow.</p>
<p style="text-align: center; ">
	<img alt="Triggering AppleScripts from Calendar Alerts in Mountain Lion" data-src-height="431" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-17-waldie-03.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>To schedule an Automator workflow, choose the Calendar Alarm template.</em></p>
<p>
	<em>To Trigger an AppleScript App</em></p>
<p>
	If your script is an app, you just need to set the workflow to launch it. Add the Launch Application action to the workflow. From the application popup menu, choose Other... and navigate to your saved AppleScript app.</p>
<p style="text-align: center; ">
	<img alt="Triggering AppleScripts from Calendar Alerts in Mountain Lion" data-src-height="144" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-17-waldie-04.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>The Launch Application action can be used to launch an AppleScript app.</em></p>
<p>
	<em>To Trigger AppleScript Code</em></p>
<p>
	If you'd rather not create an app (an app + your Automator workflow means more files to manage), you can embed compiled AppleScript code right within your workflow. Find the Run AppleScript action and drag it to the workflow. Then, insert the desired script code into the action.</p>
<p style="text-align: center; ">
	<img alt="Triggering AppleScripts from Calendar Alerts in Mountain Lion" data-src-height="324" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-17-waldie-05.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>The Run AppleScript action can be set to run code embedded in your Automator workflow.</em></p>
<p>
	<em>To Schedule the Script</em></p>
<p>
	Once you've got your workflow configured, go ahead and save it. Automator automatically adds it to an Automator calendar (which is created if it doesn't exist yet) in the Calendars app. An Open File alarm is added to the event and set to run the workflow. Now, adjust the start date of the event as needed, put it on a repeating schedule, etc.</p>
<p style="text-align: center; ">
	<img alt="Triggering AppleScripts from Calendar Alerts in Mountain Lion" data-src-height="463" data-src-width="323" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-17-waldie-06.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Open File alarms are used to trigger Automator Calendar Alarm workflows.</em></p>
<p>
	<strong>Use AppleScript to Create a Scheduled Event</strong></p>
<p>
	If you create an event in the Calendars app and add an Open File alarm, you should find that you're unable to select a saved AppleScript app. You can select a compiled AppleScript file, but this is essentially useless because when the event triggers, the Open File alarm simply causes the compiled script to open in AppleScript editor. Not what you need. What you really need is to open a saved script app. AppleScript to the rescue. To work around the limitation, just run the following script. It asks you to select a saved AppleScript app. It then creates an event at the current date and time on an AppleScripts calendar, which it creates if it doesn't exist already. The script then adds an Open File alarm to the newly created event and sets it to open your selected script app. Yep, that's right. Although you can't manually set an event to open a saved AppleScript app, you can script the process.</p>
<p>
	<em>NOTE: You can download the complete script below <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-03-17-TUAW_Waldie.zip">here</a>.</em></p>
<p>
<script src="https://gist.github.com/benwaldie/5184446.js"></script></p>
<p>
	So, there you go. A number of workarounds for triggering scripts from Calendar events in Mountain Lion. So, schedule away! Happy Scripting!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/03/18/triggering-applescripts-from-calendar-alerts-in-mountain-lion/">Triggering AppleScripts from Calendar Alerts in Mountain Lion</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 18 Mar 2013 14:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/03/18/triggering-applescripts-from-calendar-alerts-in-mountain-lion/">Triggering AppleScripts from Calendar Alerts in Mountain Lion</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 18 Mar 2013 14:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href=http://www.tuaw.com/tag/applescript>Read</a> | <a href="http://www.tuaw.com/2013/03/18/triggering-applescripts-from-calendar-alerts-in-mountain-lion/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20507414/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/03/18/triggering-applescripts-from-calendar-alerts-in-mountain-lion/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>actions</category><category>alarms</category><category>applescript</category><category>automator</category><category>calendar</category><category>events</category><category>mountain lion</category><category>MountainLion</category><category>productivity</category><category>workflows</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 18 Mar 2013 14:00:00 EST</pubDate></item><item><title>Use Keyboard Maestro to get ready for podcast recording</title><link>http://www.tuaw.com/2013/03/12/keyboard-maestro-before-and-after-skype-podcasting/</link><guid isPermaLink="true">http://www.tuaw.com/2013/03/12/keyboard-maestro-before-and-after-skype-podcasting/</guid><comments>http://www.tuaw.com/2013/03/12/keyboard-maestro-before-and-after-skype-podcasting/#comments</comments><description><![CDATA[<p>
	<img alt="" src="http://www.blogcdn.com//media/2013/03/skype-appicon-version6-256x256.jpg" style="float: right; margin: 0px 0px 8px 8px; border: 0px solid; width: 250px; height: 250px;" /></p>
<p>
	When you're in the middle of recording a podcast, chances are you'd like your Mac to be focused on that job -- not other network-hungry activities like syncing Dropbox, or CPU- and disk-intensive tasks like saving a Time Machine backup.</p>
<p>
	Gabe at <a href="http://macdrifter.com">Macdrifter</a> wrote about his <a href="http://macdrifter.com/2013/03/pause-timemachine-macro.html">Pause TimeMachine Macro</a>, which he uses when he starts using Skype. He adds that he knows there are other (potentially "better") ways to do this, but that his was just a fast-and-dirty solution.</p>
<p>
	Seeing Gabe's macros reminded me that I wanted something like this for when I am <a href="http://www.muleradio.net/impolite/">recording the <em>Impolite Company</em> podcast</a>. Gabe's macro enables and disables Time Machine, but I also want to enable and disable <a href="http://www.crashplan.com">CrashPlan</a> and <a href="http://www.dropbox.com">Dropbox</a>.</p>
<p>
	Like Gabe, I have a tendency to forget to turn things back on, so I wanted to automate this as much as possible. Since I tend to only run Skype when I am actively recording a podcast, I decided to trigger my macros around the Skype.app either launching or quitting.</p>
<p>
	So I wrote two <a href="http://www.keyboardmaestro.com/main/">Keyboard Maestro</a> macros: one for when Skype <em>starts</em> and one for when Skype <em>quits</em>.</p>
<h3 id="prepareforapodcast">
	Prepare For A Podcast</h3>
<p>
	My first new Keyboard Maestro macro is called <em>(wait for it)</em> "Prepare For A Podcast". This is what it looks like in Keyboard Maestro:</p>
<p style="text-align:center">
	<img alt="" border="0" height="364" src="http://www.blogcdn.com//media/2013/03/km-skype-prepare-for-a-podcast.jpg" width="456" /></p>
<p>
	<strong>Translation:</strong> In Keyboard Maestro's language, this is what the above means:</p>
<p>
	Whenever Skype launches, Keyboard Maestro will automatically do the following:</p>
<p>
	1) If a file exists at /Library/LaunchDaemons/com.crashplan.engine.plist (which is where CrashPlan's launchd file is stored) <em>unload</em> that file (which will disable CrashPlan) via AppleScript:</p>
<pre>
        <code>do shell script "launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist" with administrator privileges </code></pre>
<p>
	<em>n.b. "with administrator privileges" will prompt the user for their password. Also note that I am using Growl notifications to tell the user what is happening, especially when a password is being requested.</em></p>
<p>
	2) Likewise, disable Time Machine with another bit of AppleScript:</p>
<pre>
        <code>do shell script "tmutil disable" with administrator privileges </code></pre>
<p>
	3) If Dropbox is running, quit it.</p>
<p>
	4) Open the "Sound" preference pane (which I want so I can make sure that my USB mic is configured properly for Skype).</p>
<h3 id="resumeafterapodcast">
	Resume After A Podcast</h3>
<p>
	What happens <em>after</em> a podcast is pretty much exactly the opposite:</p>
<p style="text-align:center">
	<img alt="" border="0" height="343" src="http://www.blogcdn.com//media/2013/03/km-skype-resume-after-a-podcast-1363036689.jpg" width="456" /></p>
<p>
	<strong>Translation:</strong> This macro will be triggered <em>automatically</em> whenever Skype quits, and this is what it will do:</p>
<p>
	1) If the plist is found, load it into launchd:</p>
<pre>
        <code>do shell script "launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist" with administrator privileges </code></pre>
<p>
	2) Resume Time Machine:</p>
<pre>
        <code>do shell script "tmutil enable" with administrator privileges </code></pre>
<p>
	3) If Dropbox is not running, launch it via shell script:</p>
<pre>
        <code>open -a Dropbox </code></pre>
<h3 id="download">
	Download</h3>
<p>
	As with Gabe's macros, I am sure that there are other (potentially better) ways to do this, but I hope that this might be useful to others. These macros assume that you don't generally leave Skype running for general use, but that you only launch it when it's podcast time.</p>
<p>
	To download my Keyboard Maestro macros, you can either <a href="https://github.com/tjluoma/keyboard-maestro-for-podcasts">check them out at Github</a> or right (control) click on the links below:</p>
<ul>
	<li>
		<a href="https://raw.github.com/tjluoma/keyboard-maestro-for-podcasts/master/prepare-for-a-podcast.kmmacros">prepare-for-a-podcast.kmmacros</a></li>
	<li>
		<a href="https://raw.github.com/tjluoma/keyboard-maestro-for-podcasts/master/resume-after-a-podcast.kmmacros">resume-after-a-podcast.kmmacros</a></li>
</ul><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/03/12/keyboard-maestro-before-and-after-skype-podcasting/">Use Keyboard Maestro to get ready for podcast recording</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Tue, 12 Mar 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/03/12/keyboard-maestro-before-and-after-skype-podcasting/">Use Keyboard Maestro to get ready for podcast recording</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Tue, 12 Mar 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href=https://github.com/tjluoma/keyboard-maestro-for-podcasts>Read</a> | <a href="http://www.tuaw.com/2013/03/12/keyboard-maestro-before-and-after-skype-podcasting/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20497766/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/03/12/keyboard-maestro-before-and-after-skype-podcasting/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>features</category><category>Keyboard Maestro</category><category>KeyboardMaestro</category><category>Mac</category><category>podcast</category><category>skype</category><dc:creator>TJ Luoma</dc:creator><pubDate>Tue, 12 Mar 2013 08:00:00 EST</pubDate></item><item><title>More Tips for Troubleshooting Automator Workflows</title><link>http://www.tuaw.com/2013/03/11/more-tips-for-troubleshooting-automator-workflows/</link><guid isPermaLink="true">http://www.tuaw.com/2013/03/11/more-tips-for-troubleshooting-automator-workflows/</guid><comments>http://www.tuaw.com/2013/03/11/more-tips-for-troubleshooting-automator-workflows/#comments</comments><description><![CDATA[<p>
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/troubleshootautomator-1362951589.png" style="margin: 4px; float: right; " />In my <a href="http://www.tuaw.com/2013/03/04/tips-for-troubleshooting-automator-workflows/">last post</a>, I shared some useful tips for troubleshooting Automator workflow problems. I didn't cover everything, though. There are lots of other ways you can troubleshoot your workflow. Here are some more tips to help.</p>
<p>
	<strong>1. Use Get Selected Finder Items Wisely</strong></p>
<p>
	Automator workflows are frequently created to process files and folders. When you save a workflow as an application, you can drag files and folders onto it and they're passed right into the workflow for processing. Other types of workflows behave similarly. Save a Folder Action workflow, for example, and every time new items are added to the folder, they're automatically passed to the workflow for processing.</p>
<p style="text-align: center; ">
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="149" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-10-waldie-01.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>At the top of a workflow, Automator tells you if it receives files and folders as input.</em></p>
<p>
	From time to time, however, you may notice that your workflow has processed your files twice, or that it's encountered some kind of obscure error. Often, this is due to the presence of a Get Selected Finder Items action at the beginning of the workflow. As enticing as its name sounds, the Get Selected Finder Items action isn't always needed to process files and folders. Remember, depending on the type of workflow you built, those items may be passed automatically to your workflow. In these cases, the inclusion of the Get Selected Finder Items action causes the dropped items to be appended to themselves. This can result in the items being processed twice or an error. So, what's the solution? Just try removing the Get Selected Finder Items action from the beginning of your workflow. Many times, that one simple change fixes the problem.</p>
<p style="text-align: center; ">
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="209" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-10-waldie-02.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Don't insert the Get Selected Finder Items action at the start of a workflow if your workflow already receives Finder items as input.</em></p>
<p>
	<strong>2. Finding Missing Output Files</strong></p>
<p>
	Imagine this. You run an Automator workflow that takes a PDF and outputs its pages as images. The only problem is that the images never seem to show up. Sound familiar? If you've ever been unable to find files output by a workflow, it may not necessarily mean that your workflow failed. Those files may actually be buried somewhere on your system. This is because some Automator actions generate their output files in hidden temporary folders. The Render PDF Pages as Images action is one example. It extracts the pages of a PDF as image files, gives them unique names, and saves them into a hidden temp folder.</p>
<p style="text-align: center; ">
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="393" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-10-waldie-03.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Render PDF Pages as Images sneakily outputs files to a hidden folder. Note that it doesn't have an option to select an output folder.</em></p>
<p>
	To determine whether this has happened, run your workflow in Automator. Then, open the action's Results area. If there are files or folders listed, you should be able to figure out where they're located by viewing them in list view.</p>
<p style="text-align: center; ">
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="343" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-10-waldie-04.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>An action's Results area tells you if an action really produced a result.</em></p>
<p>
	To output the files or folders to the desired location, just insert a Move Finder Items action into your workflow. This should move the items from their secret location to the Desktop or wherever else you choose.</p>
<p style="text-align: center; ">
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="450" data-src-width="416" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-10-waldie-05.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Use the Move Finder Items action to move hidden output files someplace more useful.</em></p>
<p>
	<strong>3. Improving Recorded Task Playback</strong></p>
<p>
	A great feature of Automator is its ability to record things you do manually, so you can play them back later as part of your workflow. A not so great feature of Automator is its knack for being unable to play back what it records. There are a number of reasons this can happen, and some options for fixing things.</p>
<p>
	You may have made a mistake while recording. Remember, Automator is watching. So, it picks up your mistakes too. If this happens, try selecting the extra steps in the Watch Me Do action Automator adds to the workflow. Then, press the Delete key to remove them.</p>
<p style="text-align: center; ">
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="200" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-10-waldie-06.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>You can remove recorded steps by selecting and deleting them.</em></p>
<p>
	You may have moved too fast, and Automator couldn't keep up. It may have missed some of what you did. You can try to resolve the problem by recording the steps again. This time, take your sweet time.</p>
<p>
	Automator may be unable to repeat what you did manually. Unfortunately, Automator can't access everything in OS X. It can access a lot, but not everything. If this happened, consider trying a third-party macro utility, such as <a href="http://plumamazing.com/mac/ikey/">iKey</a>. It may have greater reach than Automator.</p>
<p>
	<strong>4. Locating Missing Actions</strong></p>
<p>
	If you've ever launched Automator but have been unable to locate an action that you used in the past, it may not mean that action is entirely gone from your Mac. Automator may just be unable to load it for some reason. For example, maybe the app the action works with isn't installed anymore. You can see what Automator is unable to load by checking the Console app (in <em>/Applications/Utilities</em>). Just open it up, launch Automator, and see what shows up in the Console.</p>
<p style="text-align: center; ">
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="252" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-10-waldie-07.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>The Console app tells you what actions Automator can't load. Here, the Entourage actions weren't loaded because I don't have Entourage installed anymore. I now have Outlook installed.</em></p>
<p>
	<strong>5. Service Workflows Not Triggering?</strong></p>
<p>
	Have you created service workflows, but when you trigger them, they don't seem to run? Give them some time. For whatever reason, they may take some time to get going. After one has run, however, subsequent service workflows should run a bit faster.</p>
<p>
	You may have also noticed that you can assign keyboard shortcuts to Service workflows. If you haven't noticed this, you can do it in System Preferences &gt; Keyboard &gt; Keyboard Shortcuts.</p>
<p style="text-align: center; ">
	<img alt="More Tips for Troubleshooting Automator Workflows" data-src-height="409" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-10-waldie-08.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Assigning a keyboard shortcut to a Service workflow</em></p>
<p>
	Once you've assigned a keyboard shortcut, you may have found that the workflow doesn't run when you press the keyboard shortcut. One possible fix is to manually choose the workflow from the application's Services menu. Then, once it's been triggered for the first time, the keyboard shortcut often starts working again.</p>
<p>
	Hopefully, these tips and my prior tips have put you on the path to more stable and reliable workflows. Good luck and Happy Scripting!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/03/11/more-tips-for-troubleshooting-automator-workflows/">More Tips for Troubleshooting Automator Workflows</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 11 Mar 2013 11:30:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/03/11/more-tips-for-troubleshooting-automator-workflows/">More Tips for Troubleshooting Automator Workflows</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 11 Mar 2013 11:30:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href=http://www.tuaw.com/tag/automator>Read</a> | <a href="http://www.tuaw.com/2013/03/11/more-tips-for-troubleshooting-automator-workflows/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20496332/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/03/11/more-tips-for-troubleshooting-automator-workflows/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>actions</category><category>applescript</category><category>automation</category><category>automator</category><category>Mac</category><category>productivity</category><category>scripting</category><category>tips</category><category>tricks</category><category>troubleshooting</category><category>workflows</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 11 Mar 2013 11:30:00 EST</pubDate></item><item><title>Tips for Troubleshooting Automator Workflows</title><link>http://www.tuaw.com/2013/03/04/tips-for-troubleshooting-automator-workflows/</link><guid isPermaLink="true">http://www.tuaw.com/2013/03/04/tips-for-troubleshooting-automator-workflows/</guid><comments>http://www.tuaw.com/2013/03/04/tips-for-troubleshooting-automator-workflows/#comments</comments><description><![CDATA[<p>
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/troubleshootautomator.png" style="margin: 4px; float: right; " />Automator's great for streamlining time consuming and repetitive tasks on your Mac. It's easy. Just launch it, find a few actions, and string them together to form a workflow. Then, run your workflow anytime you want to perform that series of tasks again.</p>
<p>
	What happens if your workflow doesn't run as you expect, though? Finding and solving problems in Automator is often easier said than done. Suddenly, the simple tool that's supposed to make your life easier has become a real pain in the neck. This week's post covers some things you can do to troubleshoot a finicky Automator workflow, track down the problem, and hopefully solve it, so you can get back to work.</p>
<p>
	<strong>1. Run Saved Workflows in Automator</strong></p>
<p>
	Automator workflows are saved and run in a variety of ways - as apps, iCal alarms, print plugins, and more. When a saved workflow encounters a problem, however, it may be next to impossible to figure out what went wrong. This is because saved workflows don't really include any diagnostic tools. In some cases, the workflow may even fail silently, without alerting you that something is wrong. Your only indication of a problem may be a lack of the end result you were expecting. Not very helpful, especially in a longer multi-action workflow. When you encounter a problem with a saved workflow, your best bet is to open up the workflow in Automator, and try running it there. By doing so, you'll gain access to some of the techniques described below.</p>
<p>
	<strong>2. Fake Workflow Input</strong></p>
<p>
	When you run a workflow app or plugin within Automator, you may see an alert indicating that the workflow will not receive input.</p>
<p style="text-align: center; ">
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="230" data-src-width="447" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-03-waldie-01.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>An Automator Input Alert for a Text Service Workflow</em></p>
<p>
	This is because, often, saved Automator workflows expect input for processing. For example, a workflow app may expect dropped files or folders as input, a service workflow may expect text as input, or a print plugin may expect PDF files from the print system. In any case, just dismiss the alert and add an action to the beginning of the workflow to retrieve the required type of input. If your workflow processes files, for example, add a <em>Get Specified Finder Items</em> action. If your workflow processes text, add a <em>Get Specified Text</em> action. Whatever you add, just be sure to remove it once you're finished troubleshooting.</p>
<p style="text-align: center; ">
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="293" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-03-waldie-02.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Get Specified Text at the Beginning of a Text Service Workflow</em></p>
<p>
	<strong>3. Check Action Results</strong></p>
<p>
	Automator works by passing information to actions for processing. Most actions perform a very specific function. As such, they accept specific types of information as input. And, they produce different types of output. The <em>New TextEdit Document</em> action, for example, wants text as input. It then adds this text to a new TextEdit document, and passes the document as output for further processing.</p>
<p>
	Often, when a workflow fails or produces an undesired result, it's because actions aren't receiving or producing the expected types of information. To diagnose this problem, click the Results button beneath each action in your workflow. Then, when you run the workflow, you can see exactly what information is being passed from action to action.</p>
<p>
	Suppose, for example, I have a workflow that should take the contents of a text file and add it to a new TextEdit document. I may try creating my workflow with the following actions:</p>
<ul>
	<li>
		<em>Get Specified Finder Items</em> - Configured to get a text file</li>
	<li>
		<em>Filter Paragraphs</em> - Configured to look for non-empty paragraphs</li>
	<li>
		<em>New TextEdit Document</em></li>
</ul>
<p>
	All the actions appear to link up properly, and the workflow may even run without an error. But, the result is not what I want. Rather than the content of the text file being added to the new TextEdit document, the path of the document is added.</p>
<p style="text-align: center; ">
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="413" data-src-width="543" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-03-waldie-03.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>A Misbehaving Text Workflow</em></p>
<p style="text-align: center; ">
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="314" data-src-width="496" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-03-waldie-04.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>An Undesired Workflow Result</em></p>
<p>
	By displaying the result area of each action in the workflow, I can see that a file path was passed to the <em>Filter Paragraphs</em> action as input. I can also see that the same file path was output by the action, rather than the paragraphs I was expecting. This tells me that there's something wrong with the <em>Filter Paragraphs</em> action.</p>
<p style="text-align: center; ">
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="450" data-src-width="356" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-03-waldie-05.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Action Results Indicate Potential Problems</em></p>
<p>
	Checking the action's description area provides additional clues. It tells me the action expects text as input, not files.</p>
<p style="text-align: center; ">
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="329" data-src-width="546" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-03-waldie-06.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Action Descriptions Specify Input and Output Types</em></p>
<p>
	So, in this case, the fix is to insert an action that outputs text, rather than files, before the <em>Filter Paragraphs</em> action.</p>
<p>
	<em>NOTE: Surprisingly, Automator doesn't include an action for reading text from a file. There are third-party actions available that can do this. Or, as a workaround, you can try using the Combine Text Files action, which receives one or more files as input and outputs their text content.</em></p>
<p>
	<strong>4. Check Automator's Log</strong></p>
<p>
	Checking the results of an action doesn't always tell you what went wrong. You may glean a little more information by consulting Automator's log area. Press <em>Command+Option+L</em> or choose <em>View &gt; Log</em> to display it. When you run a workflow, the log area tells you which actions ran, and often indicates problems that were encountered along the way, such as an action that wasn't supplied with the appropriate type of input.</p>
<p style="text-align: center; ">
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="206" data-src-width="449" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-03-waldie-07.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Automator's Log Area Indicates Successes and Failures</em></p>
<p>
	Sometimes, the log tells you that information was converted from one type to another. This is because, in some cases, Automator tries to make incompatible actions work together. This doesn't always work, however, and can result in an error. So, be on the lookout for failed conversions.</p>
<p>
	<strong>5. Step Through Workflows</strong></p>
<p>
	Running a workflow and checking action results is great, but it's even more useful to check the results of each step of your workflow as it happens. You can do this by stepping through the workflow step by step. Click the <em>Step</em> button in the workflow's toolbar or select <em>Workflow &gt; Step</em> from the menu bar.</p>
<p style="text-align: center; ">
	<img alt="Tips for Troubleshooting Automator Workflows" data-src-height="111" data-src-width="290" src="http://www.blogcdn.com/www.tuaw.com/media/2013/03/2013-03-03-waldie-08.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Automator's Step Button</em></p>
<p>
	The above techniques may not resolve every problem you encounter with Automator, but they will certainly help you to more easily identify solutions for some. Happy Scripting!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/03/04/tips-for-troubleshooting-automator-workflows/">Tips for Troubleshooting Automator Workflows</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 04 Mar 2013 07:30:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/03/04/tips-for-troubleshooting-automator-workflows/">Tips for Troubleshooting Automator Workflows</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 04 Mar 2013 07:30:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/03/04/tips-for-troubleshooting-automator-workflows/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20486443/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/03/04/tips-for-troubleshooting-automator-workflows/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>action</category><category>applescript</category><category>automator</category><category>Mac</category><category>Mountain Lion</category><category>MountainLion</category><category>services</category><category>tips</category><category>tricks</category><category>troubleshooting</category><category>workflow</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 04 Mar 2013 07:30:00 EST</pubDate></item><item><title>AppleScript Productivity > Create OmniFocus Followups from Contacts</title><link>http://www.tuaw.com/2013/02/25/applescript-productivity-create-omnifocus-followups-from-conta/</link><guid isPermaLink="true">http://www.tuaw.com/2013/02/25/applescript-productivity-create-omnifocus-followups-from-conta/</guid><comments>http://www.tuaw.com/2013/02/25/applescript-productivity-create-omnifocus-followups-from-conta/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScript Productivity  Create OmniFocus Followups from Contacts" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/ofocusscript-1361757928.png" style="margin: 4px; float: right; " />As an <a href="http://www.omnigroup.com/products/omnifocus/">OmniFocus</a> for Mac user, it's important that I can quickly create tasks at any time, in any app. OmniFocus makes this pretty easy, by providing integration with OS X Mail, a keyboard shortcut for clipping content in apps such as Safari, a system-wide Quick Entry window and a Services menu item. One feature OmniFocus lacks, however, is direct integration with the Contacts app. Suppose I am in Contacts, for example, and I need to schedule a followup phone call or email to one of my clients? Sure, I could bring up the Quick Entry window and enter the task, but I want something a bit more streamlined. I can accomplish just what I need by writing some custom AppleScripts. The following two examples demonstrate how to write AppleScript-based plug-ins for the Contacts app, which add OmniFocus followup options right into the email and phone number popup menus of your contacts.</p>
<p>
	<em>Note: If you have any trouble following along, you can download both of the scripts outlined in this post <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-02-24-TUAW_Waldie.zip">here</a>.</em></p>
<p>
	<strong>Creating the Email Followup Script Plug-In</strong></p>
<p>
	<strong>1.</strong> Quit the Contacts app.</p>
<p>
	<strong>2.</strong> Launch AppleScript Editor in <em>/Applications/Utilities</em> and create a new script document.</p>
<p>
	<strong>3.</strong> Insert the following code:</p>
<p>
<script src="https://gist.github.com/benwaldie/5025494.js"></script></p>
<p>
	<strong>4.</strong> Save it as a script named <em>Contacts &gt; Email Follow Up with OmniFocus.scpt</em> into the <em>~/Library/Address Book Plug-Ins</em> folder in your home directory. If this folder doesn't already exist, go ahead and create it.</p>
<p style="text-align: center; ">
	<img alt="AppleScript Productivity  Create OmniFocus Followups from Contacts" data-src-height="260" data-src-width="460" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-24-waldie-01-1361757980.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>Saving the Script into the Address Book Plug-Ins folder</em></p>
<p style="text-align: center; ">
	<img alt="AppleScript Productivity  Create OmniFocus Followups from Contacts" data-src-height="287" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-24-waldie-02.png" style="margin:4px" /></p>
<p style="text-align: center; ">
	<em>The Address Book Plug-Ins folder in ~/Library</em></p>
<p>
	<strong>Creating an OmniFocus Email Followup Task</strong></p>
<p>
	To give your new plug-in a try, launch the Contacts app and go to a contact. When you hover over the email address field, it becomes highlighted. Click it and choose <em>Follow Up with OmniFocus </em>from the popup menu that appears.</p>
<p style="text-align: center; ">
	<img alt="AppleScript Productivity  Create OmniFocus Followups from Contacts" data-src-height="454" data-src-width="477" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-24-waldie-03.png" style="margin:4px" /></p>
<p>
	The OmniFocus Quick Entry window appears, and it contains an email follow-up task for the contact, including a note with a clickable email link.</p>
<p style="text-align: center; ">
	<img alt="AppleScript Productivity  Create OmniFocus Followups from Contacts" data-src-height="117" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-24-waldie-04.png" style="margin:4px" /></p>
<p>
	<strong>Creating the Phone Call Followup Script Plug-In</strong></p>
<p>
	The process to create phone call followup plug-in is essentially the same.</p>
<p>
	<strong>1.</strong> Quit the Contacts app again.</p>
<p>
	<strong>2.</strong> Create another AppleScript Editor document.</p>
<p>
	<strong>3.</strong> Insert the following code this time:</p>
<p>
<script src="https://gist.github.com/benwaldie/5025527.js"></script></p>
<p>
	<strong>4.</strong> Save the script as a script named <em>Contacts &gt; Phone Call Follow Up with OmniFocus.scpt</em> into the <em>~/Library/Address Book Plug-Ins</em> folder in your home directory.</p>
<p>
	<strong>Creating an OmniFocus Phone Call Followup Task</strong></p>
<p>
	Launch the Contacts app again. This time, click on a contact's phone number field and choose <em>Follow Up with OmniFocus</em> from the popup menu.</p>
<p style="text-align: center; ">
	<img alt="AppleScript Productivity  Create OmniFocus Followups from Contacts" data-src-height="455" data-src-width="455" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-24-waldie-05.png" style="margin:4px" /></p>
<p>
	Again, OmniFocus' Quick Entry window is displayed. This time, it contains a phone call follow-up task and a note containing the phone number.</p>
<p style="text-align: center; ">
	<img alt="AppleScript Productivity  Create OmniFocus Followups from Contacts" data-src-height="117" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-24-waldie-06.png" style="margin:4px" /></p>
<p>
	Voila, you now have quick OmniFocus integration with Contacts, and you can use it anytime you need to schedule a follow-up.</p>
<p>
	Until next time, Happy Scripting!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/02/25/applescript-productivity-create-omnifocus-followups-from-conta/">AppleScript Productivity > Create OmniFocus Followups from Contacts</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 25 Feb 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/02/25/applescript-productivity-create-omnifocus-followups-from-conta/">AppleScript Productivity > Create OmniFocus Followups from Contacts</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 25 Feb 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/02/25/applescript-productivity-create-omnifocus-followups-from-conta/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20475419/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/02/25/applescript-productivity-create-omnifocus-followups-from-conta/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>automation</category><category>contacts</category><category>Mac</category><category>mountain lion</category><category>MountainLion</category><category>omnifocus</category><category>os x</category><category>OsX</category><category>plug-in</category><category>productivity</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 25 Feb 2013 08:00:00 EST</pubDate></item><item><title>AppleScripting OmniFocus > Send Completed Task Report to Evernote</title><link>http://www.tuaw.com/2013/02/18/applescripting-omnifocus-send-completed-task-report-to-evernot/</link><guid isPermaLink="true">http://www.tuaw.com/2013/02/18/applescripting-omnifocus-send-completed-task-report-to-evernot/</guid><comments>http://www.tuaw.com/2013/02/18/applescripting-omnifocus-send-completed-task-report-to-evernot/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/ofocusscript.png" style="margin: 4px; float: right; " />I've mentioned before that <a href="http://www.omnigroup.com/products/omnifocus/">OmniFocus</a> is my task manager of choice. Each morning, I pull up a list of scheduled tasks for the day, and focus on getting them done. In OmniFocus, I've set up Perspectives (saved window states) for both Due tasks and Completed tasks. What I really want, however, is something that will pull out recently completed tasks and summarize them in Evernote, my note management app of choice. This way, I can maintain a historical log of my progress, and pull out summaries of completed tasks to send to clients. Since this type of integration isn't built into OmniFocus or Evernote, I wrote an AppleScript to do it.</p>
<p>
	<strong>Creating the Script</strong></p>
<p>
	<em>NOTE: If you have any trouble following along, you can download my completed script <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-02-15-TUAW_Waldie.zip">here</a>.</em></p>
<p>
	<strong>1.</strong> Launch AppleScript Editor (in <em>/Applications/Utilities</em>)</p>
<p>
	<strong>2.</strong> If your system-wide script menu isn't enabled already, go into AppleScript Editor's preferences window and turn it on.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote" data-src-height="362" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-15-waldie-01.png" style="margin:4px" /></p>
<p>
	<strong>3.</strong> Create a new script document and enter the following code:</p>
<p>
<script src="https://gist.github.com/benwaldie/4965597.js"></script></p>
<p>
	<strong>4.</strong> Bring OmniFocus to the front, and from the system-wide script menu, choose <em>Open Scripts Folder &gt; Open OmniFocus Scripts Folder</em>. This creates the following folder, if it doesn't already exist -- <em>~/Library/Scripts/Applications/OmniFocus</em></p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote" data-src-height="75" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-15-waldie-02.png" style="margin:4px" /></p>
<p>
	<strong>5.</strong> Go back to AppleScript Editor and save the script as <em>OmniFocus &gt; Prepare Task Completion Report</em> into the <em>~/Library/Scripts/Applications/OmniFocus</em> folder you opened in the last step.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote" data-src-height="273" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-15-waldie-03.png" style="margin:4px" /></p>
<p>
	<strong>Running the Script</strong></p>
<p>
	Bring OmniFocus to the front. Next, select <em>OmniFocus &gt; Prepare Task Completion Report</em> from the script menu. The script starts by asking for the scope of the report. Your options are to summarize tasks from today, yesterday, this week, last week or this month. Choose one, and click OK.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote" data-src-height="371" data-src-width="497" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-15-waldie-04.png" style="margin:4px" /></p>
<p style="text-align: center; ">
</p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote" data-src-height="324" data-src-width="366" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-15-waldie-05.png" style="margin:4px" /></p>
<p>
	Next, the script retrieves a list of tasks within the specified timeframe, formats them as HTML, brings Evernote to the front, and creates a new note.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Completed Task Report to Evernote" data-src-height="294" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-15-waldie-06.png" style="margin:4px" /></p>
<p>
	You've now got a summary of recently completed tasks in Evernote. Do you feel productive yet? Until next time, happy scripting!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/02/18/applescripting-omnifocus-send-completed-task-report-to-evernot/">AppleScripting OmniFocus > Send Completed Task Report to Evernote</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 18 Feb 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/02/18/applescripting-omnifocus-send-completed-task-report-to-evernot/">AppleScripting OmniFocus > Send Completed Task Report to Evernote</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 18 Feb 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/02/18/applescripting-omnifocus-send-completed-task-report-to-evernot/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20465029/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/02/18/applescripting-omnifocus-send-completed-task-report-to-evernot/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>evernote</category><category>notes</category><category>omnifocus</category><category>productivity</category><category>task management</category><category>TaskManagement</category><category>tasks</category><category>workflow</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 18 Feb 2013 07:00:00 EST</pubDate></item><item><title>AppleScripting Dates > Elapsed Time Calculator</title><link>http://www.tuaw.com/2013/02/11/applescripting-dates-elapsed-time-calculator/</link><guid isPermaLink="true">http://www.tuaw.com/2013/02/11/applescripting-dates-elapsed-time-calculator/</guid><comments>http://www.tuaw.com/2013/02/11/applescripting-dates-elapsed-time-calculator/#comments</comments><description><![CDATA[<p>
	<img alt="Image" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/scriptheart.png" style="margin: 4px; float: right; " />Since Valentine's Day is this week, I thought I would take this opportunity to share an AppleScript I wrote to calculate how long my wife and I have been married. With this baby, I'll never be accused of forgetting how long it's been when our anniversary rolls around. The script determines the elapsed time between now (the current date and time), and a prior date and time (such as our anniversary). It then displays the result in seconds, minutes, hours, days, weeks, months and years.</p>
<p>
	Note: If you're into the whole "traditional anniversary gift" thing (I'm not), you can find a list of gift categories on <a href="http://en.wikipedia.org/wiki/Wedding_anniversary">Wikipedia</a>.</p>
<p>
	<strong>Creating the Script</strong></p>
<p>
	<em>Note: If you have any trouble following along, you can download the complete script <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-02-10-TUAW_Waldie.zip">here</a>.</em></p>
<p>
	<strong>1. </strong>Launch AppleScript Editor in <em>/Applications/Utilities</em> and create a new script document.</p>
<p>
	<strong>2.</strong> Insert the following code:</p>
<p>
<script src="https://gist.github.com/benwaldie/4751897.js"></script></p>
<p>
	Some notes about this script...</p>
<p>
	* I used some of the number calculation handlers in the Essential Subroutines section of macosxautomation.com, although, I made some slight modifications to them for the script. If you're interested in learning more about AppleScript, there are some other useful handlers there, as well, and I encourage you to check them out.</p>
<p>
	* The final display dialog sets as its icon the FavoriteItemsIcon icon file, which is embedded in the CoreTypes bundle in /System/Library/CoreServices. It is, coincidentally enough, a heart.</p>
<p>
	<strong>Using the Script</strong></p>
<p>
	To use, just run the script within AppleScript Editor, or save it as an application to be launched and run whenever you wish. First, the script asks you to enter a date and, optionally, a time.</p>
<p style="text-align: center; ">
	<img alt="Image" data-src-height="263" data-src-width="474" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-10-waldie-01.png" style="margin:4px" /></p>
<p>
	Next, the script does its calculations and displays the result. Just take a screenshot of the dialog and send it along to your significant other.</p>
<p style="text-align: center; ">
	<img alt="Image" data-src-height="435" data-src-width="474" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-10-waldie-02.png" style="margin:4px" /></p>
<p>
	Until next time, Happy Scripting and Happy Valentine's Day Week!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/02/11/applescripting-dates-elapsed-time-calculator/">AppleScripting Dates > Elapsed Time Calculator</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 11 Feb 2013 07:30:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/02/11/applescripting-dates-elapsed-time-calculator/">AppleScripting Dates > Elapsed Time Calculator</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 11 Feb 2013 07:30:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/02/11/applescripting-dates-elapsed-time-calculator/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20455770/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/02/11/applescripting-dates-elapsed-time-calculator/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>calculator</category><category>dates</category><category>Mountain Lion</category><category>MountainLion</category><category>times</category><category>valentines day</category><category>ValentinesDay</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 11 Feb 2013 07:30:00 EST</pubDate></item><item><title>AppleScripting Notification Center > Scheduling Do Not Disturb</title><link>http://www.tuaw.com/2013/02/04/applescripting-notification-center-scheduling-do-not-disturb/</link><guid isPermaLink="true">http://www.tuaw.com/2013/02/04/applescripting-notification-center-scheduling-do-not-disturb/</guid><comments>http://www.tuaw.com/2013/02/04/applescripting-notification-center-scheduling-do-not-disturb/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/ncscript.png" style="margin: 4px; float: right; " />Mountain Lion's Notification Center is great for keeping you in the loop, but it can be a huge distraction when you need to get stuff done. Sometimes, a little peace and quiet is all you need to stay productive.</p>
<p>
	As you may know, iOS 6 includes a handy Do Not Disturb feature, which can be turned on to disable notifications. It can even be set to automatically enable/disable itself at scheduled intervals. Mountain Lion also lets you disable Notification Center. Just open Notification Center and drag down to access a Show Alerts and Banners toggle switch. Note that this is a temporary setting, and disabled notifications automatically re-enable at midnight.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="123" data-src-width="301" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-03-waldie-01.png" style="margin: 4px; " /></p>
<p>
	Unlike iOS 6, though, Mountain Lion doesn't give you an option for enabling/disabling notifications on a schedule. At least, it doesn't provide a built-in option for this. With a little customized help from AppleScript, Automator, and the Calendar app, it is possible.</p>
<p>
	In this post, you'll create two Calendar Alarm Automator workflows, which can be configured to run at scheduled times to enable or disable Notification Center alerts and banners.</p>
<p>
	Note: If you have any trouble following along, you can download the completed AppleScripts and Automator workflows <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-02-03-TUAW_Waldie.zip">here</a>.</p>
<p>
	<strong>Building a Workflow to Enable Do Not Disturb</strong> (i.e. Disable Notification Center Alerts and Banners)</p>
<p>
	<strong>1.</strong> Launch Automator (in your <em>/Applications</em> folder) and create a new Calendar Alarm workflow.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="432" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-03-waldie-02.png" style="margin:4px" /></p>
<p>
	<strong>2. </strong>Search the action library for the Run AppleScript action and drag it to the workflow area.</p>
<p>
	<strong>3.</strong> Replace the pre-filled AppleScript code in the Run AppleScript action with the following:</p>
<p>
<script src="https://gist.github.com/4704790.js"></script></p>
<p>
	The script writes to Notification Center's property list file and enables Do Not Disturb mode. It then quits and relaunches Notification Center in order for the change to go into effect.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="333" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-03-waldie-03.png" style="margin:4px" /></p>
<p>
	<strong>4. </strong>You're finished building the workflow, so go ahead and save it as <em>Enable Do Not Disturb</em>.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="117" data-src-width="409" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-03-waldie-04.png" style="margin:4px" /></p>
<p>
	<strong>5.</strong> When you save the workflow, Automator puts it where it needs to go (the <em>~/Library/Workflows/Applications/Calendar</em> folder). The Calendar app launches and a new event is created in an Automator calendar, which Automator creates if it doesn't already exist. The event should be configured with an Open File alarm that's set to run the workflow. Schedule the event for the desired time, such as every weekday morning at 6 AM.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="450" data-src-width="424" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-03-waldie-05.png" style="margin:4px" /></p>
<p>
	Now, every time the event occurs, the alarm should launch the workflow and Notification Center should be disabled. As I mentioned earlier, Notification Center automatically re-enables each day at midnight. So, if you plan to schedule Do Not Disturb overnight, then you'll need to create an additional event that disables it again at 12:01 AM.</p>
<p>
	<strong>Building a Workflow to Disable Do Not Disturb</strong> (i.e. Re-Enable Notification Center Alerts and Banners)</p>
<p>
	Now that you've got a workflow to disable Notification Center, you probably want one to re-enable it.</p>
<p>
	<strong>1.</strong> Create another new Calendar Alarm workflow in Automator.</p>
<p>
	<strong>2.</strong> Search the action library for the Run AppleScript action again and drag it to the workflow area.</p>
<p>
	<strong>3. </strong>This time, replace the existing placeholder script in the Run AppleScript action with the following code:</p>
<p>
<script src="https://gist.github.com/4704801.js"></script></p>
<p>
	This code updates Notification Center's property list file to disable Do Not Disturb. Then, it relaunches Notification Center for the change to take effect.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="334" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-03-waldie-06.png" style="margin:4px" /></p>
<p>
	<strong>4.</strong> The workflow is done, so save it as <em>Disable Do Not Disturb</em>.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="115" data-src-width="407" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-03-waldie-07.png" style="margin:4px" /></p>
<p>
	<strong>5. </strong>The Calendar app should launch again and another event should be added to the Automator calendar. This event should be configured with an Open File alarm that's set to open the Disable Do Not Disturb workflow. Set it to run on the desired schedule, such as every weekday morning at 9 AM.</p>
<p style="text-align: center; ">
	<img alt="AppleScripting Notification Center  Scheduling Do Not Disturb" data-src-height="450" data-src-width="426" src="http://www.blogcdn.com/www.tuaw.com/media/2013/02/2013-02-03-waldie-08.png" style="margin:4px" /></p>
<p>
	If everything has gone according to plan, you should now have Do Not Disturb workflows that disable and re-enable Notification Center alerts and banners at the desired times. Use your alert-free time wisely. Until next time, happy scripting!</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/02/04/applescripting-notification-center-scheduling-do-not-disturb/">AppleScripting Notification Center > Scheduling Do Not Disturb</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 04 Feb 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/02/04/applescripting-notification-center-scheduling-do-not-disturb/">AppleScripting Notification Center > Scheduling Do Not Disturb</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 04 Feb 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/02/04/applescripting-notification-center-scheduling-do-not-disturb/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20447212/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/02/04/applescripting-notification-center-scheduling-do-not-disturb/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>automation</category><category>automator</category><category>calendar</category><category>do not disturb</category><category>DoNotDisturb</category><category>ical</category><category>mountain lion</category><category>MountainLion</category><category>notification center</category><category>NotificationCenter</category><category>productivity</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 04 Feb 2013 07:00:00 EST</pubDate></item><item><title>AppleScripting Evernote > Embedded Image Scaler</title><link>http://www.tuaw.com/2013/01/28/applescripting-evernote-embedded-image-scaler/</link><guid isPermaLink="true">http://www.tuaw.com/2013/01/28/applescripting-evernote-embedded-image-scaler/</guid><comments>http://www.tuaw.com/2013/01/28/applescripting-evernote-embedded-image-scaler/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting Evernote  Embedded Image Scaler" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/enotescript.png" style="margin: 4px; float: right; " />I'm a big fan of <a href="http://evernote.com/">Evernote</a>. I use it for archiving ideas, writing articles / blog posts and lots more. I often insert screenshots and other large images into my notes. Screenshots can be pretty big, and I usually don't want giant images filling up my notes. I keep wishing Evernote offered a way to resize embedded images, so I could insert thumbnails. At the moment, it doesn't. So, I decided to write my own app to resize embedded images. Here's how you can do the same...</p>
<div>
	<p>
		<strong>Creating the Script App</strong></p>
</div>
<div>
</div>
<div>
	<p>
		My script app uses Image Events, a background app in OS X, to do the scaling. So, no third-party software (other than <a href="http://www.evernote.com">Evernote</a>) is needed for this to work.</p>
</div>
<div>
</div>
<div>
	<p>
		<em>Note: If you have any trouble following along, don't worry, you can download the complete script app <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-01-27-TUAW_Waldie.zip">here</a>.</em></p>
</div>
<div>
</div>
<div>
	<p>
		<strong>1.</strong> Launch AppleScript Editor and create a new script document containing the following script:</p>
</div>
<div>
</div>
<div>
</div>
<div>
<script src="https://gist.github.com/4652080.js"></script></div>
<div>
</div>
<div>
</div>
<div>
	<p>
		If you're familiar with AppleScript, then you'll notice this script uses an open handler, making it a droplet. When triggered to process an embedded image in an Evernote note, the image is actually passed as if it was dropped on the script app.</p>
</div>
<div>
</div>
<div>
	<p>
		<strong>2.</strong> Save the script as an application named Evernote &gt; Scale Embedded Images to your Applications folder or another folder of your choice.</p>
</div>
<div>
	<img alt="AppleScripting Evernote  Embedded Image Scaler" data-src-height="249" data-src-width="438" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-27-waldie-01.png" style="margin:4px" /></div>
<div>
	<p>
		<strong>3.</strong> Go to the saved script app and Control+Click on it to reveal the Finder's contextual menu. Choose <em>Show Package Contents</em> to view the contents of the saved app bundle.</p>
</div>
<div>
	<img alt="AppleScripting Evernote  Embedded Image Scaler" data-src-height="104" data-src-width="311" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-27-waldie-02.png" style="margin:4px" /></div>
<div>
	<p>
		<strong>4.</strong> Navigate to the <em>Contents</em> folder within the script's bundle and open the <em>Info.plist</em> file in TextEdit, TextWrangler or your other favorite text editor.</p>
</div>
<div>
	<img alt="AppleScripting Evernote  Embedded Image Scaler" data-src-height="321" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-27-waldie-03.png" style="margin:4px" /></div>
<div>
	<p>
		<strong>5.</strong> Change the <em>CFBundleDocumentTypes</em> key's array to the following:</p>
</div>
<div>
<script src="https://gist.github.com/4652551.js"></script></div>
<div>
	<p>
		This Info.plist change sets the script app to only accept JPEGs, PNGs and TIFFs, and for the script app to appear as an image editor. Image Events can process other types of images too, including BMP, GIF, PSD and PICT. So, if you think you may be embedding those types of images in your notes, go ahead and add extensions for them too.</p>
</div>
<div>
</div>
<div>
	<p>
		<strong>6.</strong> Save and close the edited Info.plist.</p>
</div>
<div>
</div>
<div>
	<p>
		You're done. The script app is ready for use.</p>
</div>
<div>
</div>
<div>
	<p>
		<strong>Resizing Embedded Images in Evernote</strong></p>
</div>
<div>
</div>
<div>
	<p>
		Please note that your script app scales embedded images in Evernote notes. When an image is scaled, you can't revert back to the unscaled version. So, be pretty darn sure you want to scale an image before triggering the script.</p>
</div>
<div>
</div>
<div>
	<p>
		<strong>1.</strong> Open an Evernote note containing an embedded image.</p>
</div>
<div>
	<img alt="AppleScripting Evernote  Embedded Image Scaler" data-src-height="450" data-src-width="408" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-27-waldie-04.png" style="margin:4px" /></div>
<div>
	<p>
		<strong>2.</strong> Control+Click on an embedded image and choose <em>Open With</em>. You should see your script app in the list of supported apps. Choose <em>Evernote &gt; Scale Embedded Images</em>.</p>
</div>
<div>
	<img alt="AppleScripting Evernote  Embedded Image Scaler" data-src-height="249" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-27-waldie-05.png" style="margin:4px" /></div>
<div>
	<p>
		Evernote launches the script app and passes it the selected embedded image.</p>
</div>
<div>
</div>
<div>
	<p>
		<strong>3.</strong> When prompted, choose the desired size. Options are <em>Low</em> (320px on the longest side), <em>Medium</em> (640px) or <em>High</em> (1280px). Or, you can select <em>Custom</em> to enter another size.</p>
</div>
<div>
	<img alt="AppleScripting Evernote  Embedded Image Scaler" data-src-height="305" data-src-width="366" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-27-waldie-06.png" style="margin:4px" /></div>
<div>
	<p>
		The script opens the embedded image, scales it accordingly and saves it. Evernote detects that the image has been changed, and updates the note to reflect the new scaled version.</p>
</div>
<div>
	<img alt="AppleScripting Evernote  Embedded Image Scaler" data-src-height="415" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-27-waldie-07.png" style="margin:4px" /></div>
<div>
	<p>
		Congratulations, you've just expanded Evernote's feature set. Anytime you want a smaller version of an embedded image, your script app is ready to help. Also, while this script is intended for Evernote, you can use it outside of Evernote too. Just drag and drop JPEGs, PNGs or TIFFs onto the script app to scale them too. Until next time, happy scripting!</p>
</div><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/01/28/applescripting-evernote-embedded-image-scaler/">AppleScripting Evernote > Embedded Image Scaler</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 28 Jan 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/01/28/applescripting-evernote-embedded-image-scaler/">AppleScripting Evernote > Embedded Image Scaler</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 28 Jan 2013 08:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href=http://www.tuaw.com/tag/applescript>Read</a> | <a href="http://www.tuaw.com/2013/01/28/applescripting-evernote-embedded-image-scaler/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20440119/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/01/28/applescripting-evernote-embedded-image-scaler/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>evernote</category><category>Mac</category><category>productivity</category><category>workflow</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 28 Jan 2013 08:00:00 EST</pubDate></item><item><title>Mac Productivity > 10 TextExpander Date Snippets</title><link>http://www.tuaw.com/2013/01/21/mac-productivity-ten-textexpander-date-snippets/</link><guid isPermaLink="true">http://www.tuaw.com/2013/01/21/mac-productivity-ten-textexpander-date-snippets/</guid><comments>http://www.tuaw.com/2013/01/21/mac-productivity-ten-textexpander-date-snippets/#comments</comments><description><![CDATA[<p>
	<img alt="Mac Productivity  Ten TextExpander Date Snippets" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/textexpander.png" style="margin: 4px; float: right; " />TextExpander (<a href="http://smilesoftware.com/TextExpander/index.html">Smile Software</a>) is a utility I use each and every day on my Mac to save time and increase productivity. One of the things I use it for is formatting and inserting dates and times -- adding the date or time to a file or folder name, into an email, a document and so on. In this post, I've shared some of my most used date and time snippets. I hope you find them as useful as I do.</p>
<div>
	<p>
		If you're not a TextExpander user, I encourage you to give it a try. You can download a trial version on the Smile Software <a href="http://smilesoftware.com/TextExpander/index.html">website</a>. Let me give you a little background on how it works. The concept of TextExpander is simple. You start by creating snippets of text. You then assign abbreviations to those snippets. Whenever you type an abbreviation into any app on your Mac, presto! The corresponding snippet is inserted, replacing the abbreviation you typed. TextExpander also includes some power-user features, such as macros, which let you to insert variable information into your snippets, like dates and times. This is what I'm sharing here -- some of the macros I use for inserting dates.</p>
</div>
<div>
</div>
<div>
	<p>
		I've provided a brief description of each snippet, as well as the snippet code (the macro), and the abbreviation I use. Feel free to adjust accordingly to meet your own needs.</p>
</div>
<div>
</div>
<div>
</div>
<div>
	<p>
		<strong>1. Current Date -- Long:</strong> This snippet actually comes with TextExpander as an example. It's used to insert the current date in Month, D, YYYY format, i.e. January 9, 2013. I consider this a long date, and changed the abbreviation, so as not to conflict with my other snippets.</p>
</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Mac Productivity  Ten TextExpander Date Snippets" data-src-height="399" data-src-width="396" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-20-waldie-01.png" style="margin:4px" /></div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %B %e, %Y</div>
<div>
	Abbreviation: CDATEL</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>2. Current Date -- Short:</strong> This snippet inserts the current date in YYYY-DD-MM format, i.e. 2013-01-09. This is a good format to use when applying dates to file and folder names, as it allows them to be sorted by year, month and day.</p>
</div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %Y-%m-%d</div>
<div>
	Abbreviation: CDATES</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>3. Current Time - Long</strong> - This snippet inserts the current time in H:M:SS AM/PM format, i.e. 10:00:00 AM. While this format is good for inserting into emails or documents, it's not so good to use on file or folder names, due to its use of colons.</p>
</div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %1I:%M:%S %p</div>
<div>
	Abbreviation: CTIMEL</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>4. Current Time -- Short:</strong> This snippet inserts the current time in HH-MM-SS format, i.e. 10-00-00. This is a good format to use when applying times to file and folder names, as it doesn't contain any colons. It also uses 24-hour time, in order to avoid potential file name conflicts.</p>
</div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %H-%M-%S</div>
<div>
	Abbreviation: CTIMES</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>5. Month and Year:</strong> This snippet inserts the current month and year, in Month YYYY format, i.e. January 2013. I often need to reference the current month in this manner when writing emails.</p>
</div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %B %Y</div>
<div>
	Abbreviation: MDATE</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>6. Yesterday:</strong> The following snippet subtracts one day from the current date and inserts it in YYYY-MM-DD format, i.e. 2013-01-08.</p>
</div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %@-1D%Y-%m-%d</div>
<div>
	Abbreviation: YDATE</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>7. Tomorrow:</strong> The following snippet adds one day to the current date, and inserts it in YYYY-MM-DD format, i.e. 2013-01-10.</p>
</div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %@+1D%Y-%m-%d</div>
<div>
	Abbreviation: TDATE</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>8. Future Date:</strong> The following snippet can be customized to add a specified number of days to the current date, in YYYY-DD-MM format. I have several versions of this snippet for two, three and four days in the future.</p>
</div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %@+(INSERT NUMBER OF DAYS HERE)D%Y-%m-%dd</div>
<div>
	Abbreviation: FDATE(NUMBER OF DAYS)</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		I.e. For two days in the future:</p>
</div>
<div>
</div>
<p>
</p>
<div>
	Snippet: %@+2D%Y-%m-%dd</div>
<div>
	Abbreviation: FDATE2</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>9. Next Sunday:</strong> I often need to refer to next Sunday in emails, invoices and so on in YYYY-MM-DD format. This goes beyond what TextExpander's built-in macros can do, so I resort to AppleScript. Just set the content type of your snippet to AppleScript, and paste in the following code:</p>
</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Mac Productivity  10 TextExpander Date Snippets" data-src-height="398" data-src-width="384" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-20-waldie-02-2.png" style="margin:4px" /></div>
<div>
</div>
<p>
</p>
<div>
	Snippet:</div>
<p>
</p>
<div>
</div>
<div>
<script src="https://gist.github.com/4583391.js"></script></div>
<div>
</div>
<p>
</p>
<div>
	Abbreviation: NEXTSUN</div>
<p>
</p>
<div>
</div>
<div>
	<p>
		<strong>10. Current Week Range:</strong> I also sometimes need to insert a range of dates representing the current week. Again, this goes beyond the capabilities of TextExpander's build-in macros, so I use AppleScript. Again, set the content type to AppleScript, and paste in the following:</p>
</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Mac Productivity  Ten TextExpander Date Snippets" data-src-height="403" data-src-width="398" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-20-waldie-03.png" style="margin:4px" /></div>
<div>
</div>
<p>
</p>
<div>
	Snippet:</div>
<p>
</p>
<div>
</div>
<div>
<script src="https://gist.github.com/4583398.js"></script></div>
<div>
</div>
<p>
</p>
<div>
	Abbreviation: CWEEK</div>
<p>
</p><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/01/21/mac-productivity-ten-textexpander-date-snippets/">Mac Productivity > 10 TextExpander Date Snippets</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 21 Jan 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/01/21/mac-productivity-ten-textexpander-date-snippets/">Mac Productivity > 10 TextExpander Date Snippets</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 21 Jan 2013 07:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/01/21/mac-productivity-ten-textexpander-date-snippets/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20434072/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/01/21/mac-productivity-ten-textexpander-date-snippets/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>dates</category><category>productivity</category><category>snippets</category><category>textexpander</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 21 Jan 2013 07:00:00 EST</pubDate></item><item><title>AppleScripting OmniFocus: send due tasks to iTunes</title><link>http://www.tuaw.com/2013/01/14/applescripting-omnifocus-send-due-tasks-to-itunes/</link><guid isPermaLink="true">http://www.tuaw.com/2013/01/14/applescripting-omnifocus-send-due-tasks-to-itunes/</guid><comments>http://www.tuaw.com/2013/01/14/applescripting-omnifocus-send-due-tasks-to-itunes/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/ofocusscript.png" style="margin: 4px; float: right; " />OmniFocus is a great tool for keeping us organized. But, let's face it. We're busy people. That's why we need a task management app in the first place. How can you take your productivity to the next level? How about having your daily <a href="http://www.omnigroup.com/products/omnifocus/">OmniFocus</a> tasks read to you as you drive to work? With a little help from <a href="http://www.tuaw.com/tag/AppleScript/">AppleScript</a> and <a href="http://www.tuaw.com/tag/Automator/">Automator</a>  you can make that happen. Here's how...</p>
<div>
	<strong>Setup</strong></div>
<div>
</div>
<div>
	In order to run this script and workflow, you'll need to make sure you have an OmniFocus perspective named Due, and that it's set up to display any tasks that are considered Due Soon. This is a default perspective, so you probably already have it. You can adjust what's considered Due Soon in the Data section of OmniFocus' Preferences window, under Dates &amp; Times.</div>
<div>
</div>
<div>
	<strong>Building the Workflow</strong></div>
<div>
</div>
<div>
	<em>Note: If you get stuck or have trouble following along, you can download the complete AppleScript and Automator workflow <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-01-13-TUAW_Waldie.zip">here</a>.</em></div>
<div>
</div>
<div>
	<strong>1.</strong> Launch Automator and create a new iCal Alarm workflow.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="433" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-13-waldie-01.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>Creating an iCal Alarm workflow in Automator</em></div>
<div>
</div>
<div>
</div>
<div>
	<strong>2.</strong> Find and add the Run AppleScript action to the workflow, and enter the following AppleScript into the action's script area.</div>
<div>
</div>
<div>
	When run, this script opens OmniFocus, displays the Due perspective, retrieves a list of tasks, and generates an audio file on the Desktop.</div>
<div>
</div>
<script src="https://gist.github.com/4527422.js"></script><div>
</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="263" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-13-waldie-02.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>The Run AppleScript action handles the OmniFocus work</em></div>
<div>
</div>
<div>
</div>
<div>
	<strong>3. </strong>Add the Import Audio Files action to the workflow, and set it to Delete source files after encoding.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="87" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-13-waldie-03.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>This action imports the audio file and cleans up afterward</em></div>
<div>
</div>
<div>
</div>
<div>
	<strong>4.</strong> Insert the Add Songs to Playlist action. Set it to add to a New playlist named OmniFocus.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="91" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-13-waldie-04.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>This action adds the imported audio file to the OmniFocus playlist. It only creates it if it doesn't already exist.</em></div>
<div>
</div>
<div>
</div>
<div>
	<strong>5. </strong>Save the workflow as OmniFocus &gt; Send Due Tasks to iTunes. When you do this, iCal opens and a new event is added to an Automator calendar, which is created if it doesn't already exist. The event is configured with an Open File alarm set to run the workflow.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="117" data-src-width="411" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-13-waldie-05.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>Saving the workflow puts it in the proper location and automatically creates an iCal event</em></div>
<div>
</div>
<div>
</div>
<div>
	<strong>6.</strong> Set the workflow to run each day at the desired time.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="450" data-src-width="256" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-13-waldie-06.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>You can set the workflow to run anytime you want</em></div>
<div>
</div>
<div>
</div>
<div>
	Once configured, the workflow should run as scheduled. When it does, it should retrieve list of your OmniFocus due tasks, convert them to audio, and import them into an OmniFocus playlist.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="363" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-13-waldie-07.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>Example Due tasks in OmniFocus</em></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Send Due Tasks to iTunes" data-src-height="312" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-13-waldie-08.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>The imported audio task list can be added to your iPhone for on-the-go access</em></div><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/01/14/applescripting-omnifocus-send-due-tasks-to-itunes/">AppleScripting OmniFocus: send due tasks to iTunes</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 14 Jan 2013 10:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/01/14/applescripting-omnifocus-send-due-tasks-to-itunes/">AppleScripting OmniFocus: send due tasks to iTunes</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 14 Jan 2013 10:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/01/14/applescripting-omnifocus-send-due-tasks-to-itunes/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20427650/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/01/14/applescripting-omnifocus-send-due-tasks-to-itunes/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>automator</category><category>omnifocus</category><category>productivity</category><category>task management</category><category>TaskManagement</category><category>tasks</category><category>workflow</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 14 Jan 2013 10:00:00 EST</pubDate></item><item><title>AppleScripting OmniFocus > Swap Task Names and Notes</title><link>http://www.tuaw.com/2013/01/07/applescripting-omnifocus-swap-task-names-and-notes/</link><guid isPermaLink="true">http://www.tuaw.com/2013/01/07/applescripting-omnifocus-swap-task-names-and-notes/</guid><comments>http://www.tuaw.com/2013/01/07/applescripting-omnifocus-swap-task-names-and-notes/#comments</comments><description><![CDATA[<p>
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/ofocusscript.png" style="margin: 4px; float: right; " />I use OmniFocus on a daily basis to keep track of important tasks. On a few occasions, I've entered tasks and assigned notes to them, only to decide later that I'd rather use the note as the task name, and the task name as the note. Rather than manually cycling through my tasks and swapping the notes, I wrote an AppleScript to do it. Now, anytime I want to perform this task, I can simply run the script. Here's how I did it...</p>
<div>
	<strong>Creating the Script</strong></div>
<div>
</div>
<div>
</div>
<div>
	<strong>1.</strong> Launch AppleScript Editor (in /Applications/Utilities).</div>
<div>
</div>
<div>
</div>
<div>
	<strong>2.</strong> If your system-wide script menu isn't enabled already, go into AppleScript Editor's preferences window and turn it on.</div>
<div>
</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="362" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-06-waldie-01.png" style="margin:4px" /></div>
<div style="text-align: center; ">
	<em>The script menu is enabled in AppleScript Editor's preferences window.</em></div>
<div style="text-align: center; ">
</div>
<div>
</div>
<div>
	<strong>3.</strong> Create a new script document and enter the following code:</div>
<div>
</div>
<div>
	<em>Note: You can download the complete script <a href="http://www.automatedworkflows.com/files/demos/tuaw/2013-01-06-TUAW_Waldie.zip">here</a>.</em></div>
<div>
</div>
<div>
</div>
<div>
<script src="https://gist.github.com/4471706.js"></script></div>
<div>
</div>
<div>
	<strong>4.</strong> Bring OmniFocus to the front, and from the system-wide script menu, choose <em>Open Scripts Folder &gt; Open OmniFocus Scripts Folder</em>. This creates the following folder, if it doesn't already exist - <em>~/Library/Scripts/Applications/OmniFocus.</em></div>
<div>
</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="73" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-06-waldie-02.png" style="margin:4px" /></div>
<div style="text-align: center; ">
	<em>The script menu automatically creates application script folders if they don't exist</em></div>
<div style="text-align: center; ">
</div>
<div>
</div>
<div>
	<strong>5.</strong> Go back to AppleScript Editor and save the script as OmniFocus &gt; Swap Selected Task Names and Notes into the <em>~/Library/Scripts/Applications/OmniFocus</em> folder you opened in the last step.</div>
<div>
</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="263" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-06-waldie-03.png" style="margin:4px" /></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<em>Scripts added to the OmniFocus scripts folder appear in the script menu only when OmniFocus is in the front</em></div>
<div style="text-align: center; ">
</div>
<div>
</div>
<div>
	<strong>Running the Script</strong></div>
<div>
</div>
<div>
</div>
<div>
	To run the script, just select one or more tasks in OmniFocus. Then, select <em>OmniFocus &gt; Swap Selected Task Names and Notes</em> from the script menu. The script retrieves the selected tasks, loops through them, and swaps their names and notes. You can run the script a second time, if you decide you'd rather swap them back.</div>
<div>
</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="336" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-06-waldie-04.png" style="margin:4px" /></div>
<div style="text-align: center; ">
	<em>Some OmniFocus tasks with notes</em></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="357" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-06-waldie-05.png" style="margin:4px" /></div>
<div style="text-align: center; ">
	<em>Trigger the script from the script menu to process selected notes</em></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="206" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-06-waldie-06.png" style="margin:4px" /></div>
<div style="text-align: center; ">
	<em>The script warns you that swapping task names and notes will remove any note formatting</em></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="206" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-06-waldie-07.png" style="margin:4px" /></div>
<div style="text-align: center; ">
	<em>The script notifies you when processing is complete. It skips any notes that contain attachments, and lets you know if this occurred.</em></div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="AppleScripting OmniFocus  Swap Task Names and Notes" data-src-height="336" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2013/01/2013-01-06-waldie-08.png" style="margin:4px" /></div>
<div style="text-align: center; ">
	<em>The processed OmniFocus tasks, with swapped names and notes</em></div>
<div style="text-align: center; ">
</div>
<div>
</div>
<div>
	Whether you need to swap task names and notes or not, this should give you some insight into the scripting capabilities of OmniFocus. I'll be posting other OmniFocus scripts in the future. So, if you're an OmniFocus user, stay tuned. If you're not an OmniFocus user, then you should be. Go to the Omni Group's <a href="http://www.omnigroup.com/products/omnifocus/">website</a> and download the trial today! Happy scripting!</div><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2013/01/07/applescripting-omnifocus-swap-task-names-and-notes/">AppleScripting OmniFocus > Swap Task Names and Notes</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 07 Jan 2013 09:30:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2013/01/07/applescripting-omnifocus-swap-task-names-and-notes/">AppleScripting OmniFocus > Swap Task Names and Notes</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 07 Jan 2013 09:30:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href="http://www.tuaw.com/2013/01/07/applescripting-omnifocus-swap-task-names-and-notes/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20418412/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2013/01/07/applescripting-omnifocus-swap-task-names-and-notes/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>applescript</category><category>omnifocus</category><category>productivity</category><category>task management</category><category>TaskManagement</category><category>tasks</category><category>workflow</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 07 Jan 2013 09:30:00 EST</pubDate></item><item><title>Preparing high-res icon files with Automator</title><link>http://www.tuaw.com/2012/12/31/preparing-high-res-icon-files-with-automator/</link><guid isPermaLink="true">http://www.tuaw.com/2012/12/31/preparing-high-res-icon-files-with-automator/</guid><comments>http://www.tuaw.com/2012/12/31/preparing-high-res-icon-files-with-automator/#comments</comments><description><![CDATA[<p>
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="250" data-src-width="250" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/automatoricon.png" style="margin: 4px; float: right; " />This week's post is for all those Mac app <a href="http://www.tuaw.com/tag/developer">developers</a> out there. If you're not an app developer yet, it's a new year, and I'm sure becoming an app developer is at at the top of your resolution list. In any case, if you plan to develop apps, then you need to prepare icons for those apps. Apple provides very specific requirements for generating high resolution icons, which you can find listed on <a href="http://developer.apple.com/library/mac/#documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4">the Apple Developer Connection website</a>.</p>
<div>
	In the past, <a href="https://developer.apple.com/xcode/">Xcode</a> came with a tool named IconComposer, which could be used to generate icon files. This tool, however, didn't generate high res icon files, so Apple now discourages its use. Instead, Apple provides instructions for generating icons using an iconset, a folder of image files that can be converted to an icon file using either Xcode or the iconutil command line tool. There are, of course, other ways of creating icons. In this post, however, we'll focus on an iconset.</div>
<div>
</div>
<div>
	To manually generate an iconset folder, you start by creating a square image to serve as your icon. Next, you generate versions of the image scaled to 16x16, 32x32, 128x128, 256x256, 512x512. These scaled versions are to be named as follows:</div>
<blockquote>
	<div>
		icon_16x16.png</div>
	<div>
		icon_16x16@2x.png</div>
	<div>
		icon_32x32.png</div>
	<div>
		icon_32x32@2x.png</div>
	<div>
		icon_128x128.png</div>
	<div>
		icon_128x128@2x.png</div>
	<div>
		icon_256x256.png</div>
	<div>
		icon_256x256@2x.png</div>
	<div>
		icon_512x512.png</div>
	<div>
		icon_512x512@2x.png</div>
</blockquote>
<div>
	You place all of these images into a folder named FolderName.iconset. Then, you can process it with iconutil to generate an icns file.</div>
<div>
</div>
<div>
	Sure, creating scaled images and processing them isn't too difficult, but it's a lot of repetitive work. If you create icons regularly, it can get tedious. You're probably thinking, surely, Automator can be used to streamline the process. It can. Here, we'll create an application workflow you can run anytime you want to convert an image to an icon file. Let's get started...</div>
<div>
</div>
<div>
	<em>Note: If you're an iOS developer, feel free to adjust the workflow below accordingly.</em></div>
<div>
</div>
<div>
	<strong>Creating the Workflow</strong></div>
<div>
</div>
<div>
	Launch Automator and create a new Application workflow.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="435" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-01.png" style="margin:4px" /></div>
<div>
</div>
<div>
	Next, insert and configure the following actions.</div>
<div>
</div>
<div>
	<em>Note: This workflow is pretty long and repetitive. It's easy to get lost. If you get stuck, don't worry, you can download the complete workflow <a href="http://www.automatedworkflows.com/files/demos/tuaw/2012-12-30-TUAW_Waldie.zip">here</a>, along with a sample icon image.</em></div>
<div>
</div>
<div>
	<strong>1. Ask for Finder Items</strong> - Set this action to ask for an image file at least 1024x1024 in size.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="118" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-02.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>2. New Folder</strong> - Set this action to create a folder named MyIcon.iconset on your Desktop.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="102" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-03.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>3. Set Value of Variable</strong> - From the popup menu in this action, choose New Variable and create a variable named iconset folder.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="84" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-04.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>4. Get Folder Contents</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="82" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-05.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>5. Change Type of Images</strong> - Set this action to convert images to PNG format.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="81" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-06.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>6. Scale Images</strong> - Set this action to scale the image to a size of 1024 pixels.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="81" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-07.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>7. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_512x512@2x. This represents a 1024 image (i.e. a Retina display ready size) when the icon is created. Note that this action's title changes in the workflow to reflect the type of naming, in this case Name Single Item.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="171" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-08.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>8. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="50" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-09.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>9. Scale Images</strong> - Set this action to scale the image to a size of 512 pixels.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="80" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-10.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>10. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_512x512.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="170" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-11.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>11. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="51" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-12.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>12. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_256x256@2x.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="172" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-13.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>13. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="49" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-14.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>14. Scale Images</strong> - Set this action to scale the image to a size of 256 pixels.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="80" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-15.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>15. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_256x256.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="173" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-16.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>16. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="52" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-17.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>17. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_128x128@2x.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="172" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-18.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>18. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="50" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-19.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>19. Scale Images</strong> - Set this action to scale the image to a size of 128 pixels.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="82" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-20.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>20. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_128x128.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="172" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-21.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>21. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="51" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-22.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>22. Scale Images</strong> - Set this action to scale the image to a size of 64 pixels.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="79" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-23.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>23. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_32x32@2x.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="172" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-24.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>24. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="50" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-25.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>25. Scale Images</strong> - Set this action to scale the image to a size of 32 pixels.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="80" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-26.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>26. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_32x32.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="173" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-27.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>27. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="50" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-28.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>28. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_16x16@2x.</div>
<div style="text-align: center; ">
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="172" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-29.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>29. Duplicate Finder Items</strong></div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="49" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-30.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>30. Scale Images</strong> - Set this action to scale the image to a size of 16 pixels.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="81" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-31.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>31. Rename Finder Items</strong> - Set this action to name a single item's basename only to icon_16x16.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="171" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-32.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>32. Get Value of Variable</strong> - Set this action to get the iconset folder variable you created way back at the beginning of the workflow. You also need to set this action to ignore its input, so it doesn't continue processing the 16x16px image from the previous action. Select Action &gt; Ignore Image.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="80" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-33.png" style="margin: 4px; " /></div>
<div>
</div>
<div>
	<strong>33. Run Shell Script</strong> - Set this action to pass input as arguments. Then, enter the following command:</div>
<blockquote>
	<div>
		iconutil -c icns "$@"</div>
</blockquote>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="141" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-34.png" style="margin:4px" /></div>
<div>
</div>
<div>
	<strong>Preparing the Run the Workflow</strong></div>
<div>
</div>
<div>
	Before you begin running the workflow, you need an image you can convert to an icon. Note that iconutil requires this image to be square. So, make sure it is. If you really want to be sure it's square, you can insert a Crop Images action between steps 5 and 6, and configure it to crop to 1024x1024, scaling to the shortest side before copping. However, if your image contains transparency, this action will remove it. So, it's best to prepare your starting image as a square.</div>
<div>
</div>
<div>
	<strong>Running the Workflow</strong></div>
<div>
</div>
<div>
	When you run the workflow, you're first asked to choose an image. Select the desired image and click Choose.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="331" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-35.png" style="margin:4px" /></div>
<div>
</div>
<div>
	The workflow runs, an iconset folder is created on your Desktop and passed to iconutil, which generates an icns file.</div>
<div>
</div>
<div style="text-align: center; ">
	<img alt="Preparing HighRes Icon Files with Automator" data-src-height="384" data-src-width="450" src="http://www.blogcdn.com/www.tuaw.com/media/2012/12/2012-12-30-waldie-36.png" style="margin:4px" /></div>
<div>
</div>
<div>
	You're ready to plug your icns file into your app. Now, any time you need to generate an icon, just create a square image and trigger your workflow. Happy New Year and Happy App Developing!</div><p style="padding:5px;background:#ddd;border:1px solid #ccc;clear:both;"><a href="http://www.tuaw.com/2012/12/31/preparing-high-res-icon-files-with-automator/">Preparing high-res icon files with Automator</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 31 Dec 2012 11:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.</p><p style="padding:5px;background:#ffffcc;border:1px solid #ffff99;clear:both;"><a href="http://www.tuaw.com"><img src="http://www.tuaw.com/media/feedlogo.gif" alt="TUAW - The Unofficial Apple Weblog" style="float:left;padding:0 5px 5px 0;" /></a><a href="http://www.tuaw.com/2012/12/31/preparing-high-res-icon-files-with-automator/">Preparing high-res icon files with Automator</a> originally appeared on <a href="http://www.tuaw.com">TUAW - The Unofficial Apple Weblog</a> on Mon, 31 Dec 2012 11:00:00 EST.  Please see our <a href="http://www.weblogsinc.com/feed-terms/">terms for use of feeds</a>.<br style="clear:both;"></p><p style="clear: both; padding: 8px 0 0 0; height: 2px; font-size: 1px; border: 0; margin: 0; padding: 0;"> </p><p><a href=http://www.tuaw.com/tag/developer>Read</a> | <a href="http://www.tuaw.com/2012/12/31/preparing-high-res-icon-files-with-automator/" rel="bookmark" title="Permanent link to this entry">Permalink</a> | <a href="http://www.tuaw.com/forward/20413712/" title="Send this entry to a friend via email">Email this</a> | <a href="http://www.tuaw.com/2012/12/31/preparing-high-res-icon-files-with-automator/#comments" title="View reader comments on this entry">Comments</a></p>]]></description><category>action</category><category>applescript</category><category>automator</category><category>developer</category><category>icon</category><category>Mountain Lion</category><category>MountainLion</category><category>shell script</category><category>ShellScript</category><category>workflow</category><category>XCode</category><dc:creator>Ben Waldie</dc:creator><pubDate>Mon, 31 Dec 2012 11:00:00 EST</pubDate></item></channel></rss>