<?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; applescript</title>
	<atom:link href="http://sanziro.com/tag/applescript/feed" rel="self" type="application/rss+xml" />
	<link>http://sanziro.com</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 01:55:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Automation #2 &#8211; Difference Between AppleScript and Automator</title>
		<link>http://sanziro.com/2009/07/automation-2-difference-between-applescript-and-automator.html</link>
		<comments>http://sanziro.com/2009/07/automation-2-difference-between-applescript-and-automator.html#comments</comments>
		<pubDate>Thu, 09 Jul 2009 17:12:54 +0000</pubDate>
		<dc:creator>Gaius Parx</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[automator]]></category>

		<guid isPermaLink="false">http://sanziro.com/2009/07/automation-2-difference-between-applescript-and-automator.html</guid>
		<description><![CDATA[AppleScript is the scripting language Apple designed for end-users and is build into Mac operating system. AppleScript has been around for a long time, since System 7 in 1993. AppleScript looks a lot like natural language, and you can use it to control applications, script user interface elements, access and modify application documents, pass data [...]
Related posts:<ol>
<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>
<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>
<li><a href='http://sanziro.com/2009/06/google-quick-search-box.html' rel='bookmark' title='Google Quick Search Box'>Google Quick Search Box</a> <small>Google has released Google Quick Search Box for the Mac....</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>AppleScript is the scripting language Apple designed for end-users and is build into Mac operating system. AppleScript has been around for a long time, since System 7 in 1993. AppleScript looks a lot like natural language, and you can use it to control applications, script user interface elements, access and modify application documents, pass data between different applications and access operating systems resources.</p>

<p>For example, you can use AppleScript to create a workflow that automate the export of photos in iPhoto, reduce its size, rename the photos and FTP upload to web gallery. With the latest version of AppleScript in Mac OS X 10.5, you can create a complete Cocoa GUI application using AppleScript.</p>

<p><span id="more-833"></span>
One reason for the power of AppleScript is its ability to script and control different applications. With the introduction of Mac OS X and Cocoa frameworks around 2002, Apple has make it easy for developer to create applications that can be scripted using AppleScript by defining a standard object model and interface.</p>

<p>To get a taste of AppleScript, launch the Script Editor app which is under Applications>AppleScript folder. Key in the text &#8216;say &#8220;Hello World&#8221;&#8216; into the text area. Press the <strong>&#8220;Run&#8221;</strong> button to execute the script.</p>

<p><img src="http://sanziro.com/wp-content/uploads/2009/07/applescript-script-editor.png" alt="AppleScript Script Editor" /></p>

<p>We will be looking into more AppleScript for sure in future posts. Let&#8217;s turn to a different tool Automator, which was first released with Mac OS X 10.4 Tiger for automating repetitive tasks. New Apple users sometimes are confused about the difference between AppleScript vs Automator.</p>

<p>Automator has a click-and-drop user interface and is designed for ease of use. You create automated tasks in Automator without the need to write programming codes. Automator does not replace AppleScript and it is not a graphical tool to help you create AppleScript.</p>

<p>In Automator, you program repetitive tasks by creating a workflow. A workflow consists of one or more Actions which you assembled by choosing and dragging the available Actions template to form your workflow. Automator is simple to use, requires no programming knowledge and is great if you just want to create some workflow fast.</p>

<p>Apple has provided over 250 Actions in the library for your Automator workflows. These pre-installed actions include actions to:</p>

<ul>
<li>control apps such as iCal, Mail, Safari, Image Capture, iTunes, iPhoto etc</li>
<li>manipulate Finder, files and folders</li>
<li>image actions such as capture, crop and scale images</li>
<li>automate editing PDFs</li>
<li>automate RSS for accessing and extracting web content</li>
<li>access web services using SOAP and XML-RPC</li>
</ul>

<p>Actions is build on extensible architecture for you to add new actions from third-party or actions created by you. You can create Automator actions using AppleScript or Unix shell scripts, and thus extending the capability and solve the limitation of Automator. If you do not know any programming, you are limited by the available Actions in the library.</p>

<p>If you are new to programming and automation, Automator is a good start for you to understand what is involved. With Automator, you depend on the supplied Actions if you do not want to dealt into programming. On the other hand, you might want to jump into learning AppleScript straight away, as it gives you all the power you required for automation.</p>

<p>Someone with programming experience will most likely stick with AppleScript, and only use Automator for quick and simple workflow.</p>
<p>Related posts:<ol>
<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>
<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>
<li><a href='http://sanziro.com/2009/06/google-quick-search-box.html' rel='bookmark' title='Google Quick Search Box'>Google Quick Search Box</a> <small>Google has released Google Quick Search Box for the Mac....</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://sanziro.com/2009/07/automation-2-difference-between-applescript-and-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>

