<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sanziro &#187; Automation</title>
	<atom:link href="http://sanziro.com/tag/automation/feed" rel="self" type="application/rss+xml" />
	<link>http://sanziro.com</link>
	<description></description>
	<lastBuildDate>Fri, 11 May 2012 08:24:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Automation #3 &#8211; Resizing Photos Using Automator</title>
		<link>http://sanziro.com/2009/07/automation-3-resizing-photos-using-automator.html</link>
		<comments>http://sanziro.com/2009/07/automation-3-resizing-photos-using-automator.html#comments</comments>
		<pubDate>Mon, 20 Jul 2009 09:23:55 +0000</pubDate>
		<dc:creator>Gaius Parx</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Automation]]></category>

		<guid isPermaLink="false">http://sanziro.com/2009/07/automation-3-resizing-photos-using-automator.html</guid>
		<description><![CDATA[Photo JPG files from modern digital camera has a high resolution that is often not necessary if you are posting the photos on the web for viewing. For example a 10M pixel camera typically produces photos in 2816&#215;2112 resolution. For web viewing purpose, you might want to scale down to 1024 or 800 pixel for [...]
Related posts:<ol>
<li><a href='http://sanziro.com/2009/07/automation-2-difference-between-applescript-and-automator.html' rel='bookmark' title='Automation #2 &#8211; Difference Between AppleScript and Automator'>Automation #2 &#8211; Difference Between AppleScript and Automator</a> <small>AppleScript is the scripting language Apple designed for end-users and...</small></li>
<li><a href='http://sanziro.com/2011/10/quick-way-to-group-multiple-files-into-a-folder-in-os-x-lion.html' rel='bookmark' title='Quick way to group multiple files into a folder in OS X Lion'>Quick way to group multiple files into a folder in OS X Lion</a> <small>New in OS X Lion&#8217;s Finder is the ability to...</small></li>
<li><a href='http://sanziro.com/2009/06/automation-1-introduction-to-automation-on-the-mac.html' rel='bookmark' title='Automation #1 &#8211; Introduction To Automation On The Mac'>Automation #1 &#8211; Introduction To Automation On The Mac</a> <small>We are starting a new automation series where we post...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Photo JPG files from modern digital camera has a high resolution that is often not necessary if you are posting the photos on the web for viewing. For example a 10M pixel camera typically produces photos in 2816&#215;2112 resolution. For web viewing purpose, you might want to scale down to 1024 or 800 pixel for faster uploading and viewing.</p>

<p>You can use iPhoto or Preview to scale JPG file, but Automator can help you automate the process if you have large number of JPGs.</p>

<p>For this tutorial, we are getting Automator to automate the following:</p>

<ul>
<li>Prompt to ask us to choose the photos</li>
<li>Copy the photos to <em>Pictures>output</em> folder so that original photos are not changed</li>
<li>Apply resize action to the photos in the <em>Pictures>output</em> folder.</li>
</ul>

<p>We are going to create an Automator <strong>workflow</strong> for this task, and will drag the necessary <strong>actions</strong> from the library to the workflow to achieve the above tasks.</p>

<p><span id="more-854"></span></p>

<h3>1. Start up Automator</h3>

<p><img src="/wp-content/uploads/2009/07/automator-startup.png" alt="OS X Automator" /></p>

<p>When you start up Automator, a dialog box is displayed for you to choose a starting point for your workflow. Click &#8220;Custom&#8221; starting point for this tutorial.</p>

<p><img src="/wp-content/uploads/2009/07/automator.png" alt="OS X Automator 2" /></p>

<p>On the left side of your workflow window is the <strong>Library</strong> pane where you can find the list of available actions. Apple has provided over 250 actions for your automation tasks. You are out of luck if what you required is not in the Library.</p>

<p>To add an action to your workflow, just drag the actions from the library and drop it into the workflow area on the right.</p>

<h3>2. Add &#8220;Ask for Finder Items&#8221; action</h3>

<p>Look for the action &#8220;Ask for Finder Items&#8221; in the library and drag it to the workflow area. This action will prompt us to choose the JPG files from Finder.</p>

<p><img src="/wp-content/uploads/2009/07/automator-action-1.png" alt="OS X Automator Action 1" /></p>

<p>Specify the folder to start for the selection of your JPG files. Tick to select the option &#8220;Allow Multiple Selection&#8221;.</p>

<h3>3. Add &#8220;Copy Finder Items&#8221; action</h3>

<p>&#8220;Copy Finder Items&#8221; action will copy selected items in step 2 into specified folder.</p>

<p><img src="/wp-content/uploads/2009/07/automator-action-2.png" alt="OS X Automator Action 2" /></p>

<p>On the &#8220;To&#8221; option in this action, select the folder to output the resized photos. In our example, this folder is <em>Pictures>output</em>.</p>

<h3>4. Add &#8220;Scale Image&#8221; action</h3>

<p>Add the &#8220;Scale Image&#8221; action to the workflow. Specify the desired image size. In our example, we resize the photos to fit into 1024&#215;1024.</p>

<p><img src="/wp-content/uploads/2009/07/automator-action-3.png" alt="OS X Automator Action 3" /></p>

<p>We have completed the workflow in few simple steps. You can run the workflow now by clicking on the <strong>&#8220;Run&#8221;</strong> button on top right corner.</p>

<p>Save the workflow in order to reuse this workflow in future. Choose File>Save and enter a name and location for the workflow.</p>

<p><img src="/wp-content/uploads/2009/07/automator-save.png" alt="OS X Automator Save" /></p>

<p>You can save the workflow into the default workflow file which has a &#8220;.workflow&#8221; file extension. Or you can save the workflow as an application with a &#8220;.app&#8221; extension. When workflow is saved in application format, you can simply run the workflow directly from Finder by clicking on the workflow &#8220;.app&#8221; file.</p>
<p>Related posts:<ol>
<li><a href='http://sanziro.com/2009/07/automation-2-difference-between-applescript-and-automator.html' rel='bookmark' title='Automation #2 &#8211; Difference Between AppleScript and Automator'>Automation #2 &#8211; Difference Between AppleScript and Automator</a> <small>AppleScript is the scripting language Apple designed for end-users and...</small></li>
<li><a href='http://sanziro.com/2011/10/quick-way-to-group-multiple-files-into-a-folder-in-os-x-lion.html' rel='bookmark' title='Quick way to group multiple files into a folder in OS X Lion'>Quick way to group multiple files into a folder in OS X Lion</a> <small>New in OS X Lion&#8217;s Finder is the ability to...</small></li>
<li><a href='http://sanziro.com/2009/06/automation-1-introduction-to-automation-on-the-mac.html' rel='bookmark' title='Automation #1 &#8211; Introduction To Automation On The Mac'>Automation #1 &#8211; Introduction To Automation On The Mac</a> <small>We are starting a new automation series where we post...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://sanziro.com/2009/07/automation-3-resizing-photos-using-automator.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automation #1 &#8211; Introduction To Automation On The Mac</title>
		<link>http://sanziro.com/2009/06/automation-1-introduction-to-automation-on-the-mac.html</link>
		<comments>http://sanziro.com/2009/06/automation-1-introduction-to-automation-on-the-mac.html#comments</comments>
		<pubDate>Mon, 29 Jun 2009 06:02:29 +0000</pubDate>
		<dc:creator>Gaius Parx</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[automator]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://sanziro.com/2009/06/automation-1-introduction-to-automation-on-the-mac.html</guid>
		<description><![CDATA[We are starting a new automation series where we post tutorials and tips on automating repetitive tasks and batch processing on the Mac. We will cover topics on Automator, AppleScript, Bash scripting and Ruby/Python programming. We give a brief overview to these tools and languages in the first post of the series. Automator and AppleScript [...]
Related posts:<ol>
<li><a href='http://sanziro.com/2009/07/automation-2-difference-between-applescript-and-automator.html' rel='bookmark' title='Automation #2 &#8211; Difference Between AppleScript and Automator'>Automation #2 &#8211; Difference Between AppleScript and Automator</a> <small>AppleScript is the scripting language Apple designed for end-users and...</small></li>
<li><a href='http://sanziro.com/2009/08/introduction-to-markup-languages-for-the-web.html' rel='bookmark' title='Introduction to Markup Languages For The Web'>Introduction to Markup Languages For The Web</a> <small>When you are writing for the web, such as blog...</small></li>
<li><a href='http://sanziro.com/2009/07/automation-3-resizing-photos-using-automator.html' rel='bookmark' title='Automation #3 &#8211; Resizing Photos Using Automator'>Automation #3 &#8211; Resizing Photos Using Automator</a> <small>Photo JPG files from modern digital camera has a high...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://sanziro.com/wp-content/uploads/2009/06/automator-on-mac-os-x.png" alt="Automator on Mac OS X"></img>We are starting a new automation series where we post tutorials and tips on automating repetitive tasks and batch processing on the Mac. We will cover topics on Automator, AppleScript, Bash scripting and Ruby/Python programming. We give a brief overview to these tools and languages in the first post of the series.</p>

<h3>Automator and AppleScript</h3>

<p>Mac OS X comes with Automator app to assist you to create automated tasks using an easy to use drag-and-drop user interface. Automator and its underlying AppleScript programming language is Apple&#8217;s recommended automation tool and language on the Mac. Most aspects of the Mac can be automated and controlled using the AppleScript language. Many third party OS X apps also provide an interface to allow you to control them via AppleScript.</p>

<p>(The definitive guide by Apple on Mac OS X automation is at <a href="http://www.macosxautomation.com/">www.macosxautomation.com</a>.)</p>

<p>AppleScript is available only on the Mac but is not the only scripting language on the Mac. Depending on the tasks at hand, there are several other choices.</p>

<p><span id="more-784"></span></p>

<h3>Bash Shell Scripting</h3>

<p>Underlying the Mac user interface is an Unix operating system. Before the graphical user interface as we know it today, command-line interface is the way to interact and use computer. You access the command-line interface on Mac OS X using the Terminal app. When you start up the Terminal app, Mac OS X uses the default Bash shell to handle the command-line interface.</p>

<p>Bash shell is one of the standard shells in Unix or *nix like operating system such as Linux. To automate tasks, you create Bash scripts in a text file and execute them on the command-line. There is no tool such as Automator that will assist you in creating your Bash scripts, and it is not a language you will use to control user interface elements such as mouse clicks and menu.</p>

<p>Shell scripting is second nature for people who knows Unix and Linux. Google &#8220;bash scripting&#8221; will return you tons of useful info and tips. You can also reuse your Bash scripts on non-Mac operating system such as Linux.</p>

<h3>Ruby or Python Programming</h3>

<p><a href="http://www.ruby-lang.org/en/">Ruby</a> and <a href="http://www.python.org/">Python</a> are two viable alternative to shell scripting. These &#8216;modern&#8217; scripting languages are often preferred over shell scripting for command-line automation.</p>

<p>Ruby and Python, due to their style of programming, has created two separate programming camps on the net. Most people will choose either one as their preferred language, as it takes time to learn and master a programming language. Ruby and Python are used for more than just scripting, they are also popular languages for programming the web. This is an advantage in that you can bring your knowledge of the language when you venture into web programming in the future.</p>
<p>Related posts:<ol>
<li><a href='http://sanziro.com/2009/07/automation-2-difference-between-applescript-and-automator.html' rel='bookmark' title='Automation #2 &#8211; Difference Between AppleScript and Automator'>Automation #2 &#8211; Difference Between AppleScript and Automator</a> <small>AppleScript is the scripting language Apple designed for end-users and...</small></li>
<li><a href='http://sanziro.com/2009/08/introduction-to-markup-languages-for-the-web.html' rel='bookmark' title='Introduction to Markup Languages For The Web'>Introduction to Markup Languages For The Web</a> <small>When you are writing for the web, such as blog...</small></li>
<li><a href='http://sanziro.com/2009/07/automation-3-resizing-photos-using-automator.html' rel='bookmark' title='Automation #3 &#8211; Resizing Photos Using Automator'>Automation #3 &#8211; Resizing Photos Using Automator</a> <small>Photo JPG files from modern digital camera has a high...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://sanziro.com/2009/06/automation-1-introduction-to-automation-on-the-mac.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

