<?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"
	>

<channel>
	<title>Developer Tutorials' Webmaster Blog &#187; script</title>
	<atom:link href="http://www.developertutorials.com/blog/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.developertutorials.com/blog</link>
	<description>Keeping webmasters up-to-date on technology.</description>
	<pubDate>Tue, 02 Sep 2008 14:59:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Understanding Scripting in Photoshop</title>
		<link>http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/</link>
		<comments>http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 18:19:35 +0000</pubDate>
		<dc:creator>JonGos</dc:creator>
		
		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[photoshop]]></category>

		<category><![CDATA[script]]></category>

		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/</guid>
		<description><![CDATA[Whether you want to automate tedious tasks, customize commands, or add new features, scripting takes the world of Photoshop to another level.  In this tutorial I&#8217;ll make you aware of what scripts are capable, where to find them, how to edit them and how to use them.  Eventually I&#8217;ll follow up with how [...]]]></description>
			<content:encoded><![CDATA[<p>Whether you want to automate tedious tasks, customize commands, or add new features, scripting takes the world of Photoshop to another level.  In this tutorial I&#8217;ll make you aware of what scripts are capable, where to find them, how to edit them and how to use them.  Eventually I&#8217;ll follow up with how to make your own scripts but for now that&#8217;s a topic for another day.</p>
<p>If you use Photoshop on a daily basis you&#8217;ve probably found yourself doing the same tasks over and over again and it would be nice to have the ability to automate those things to save yourself some time, right? Well scripts make that just a tad bit easier.</p>
<p>First things first, to speed up your understanding of scripting, you should probably download some existing scripts from the various repositories and websites that offer them. Here&#8217;s a list of places that offer free Adobe scripts for Photoshop and other Adobe products.</p>
<p><a href="http://www.adobe.com/cfusion/exchange/index.cfm?s=5&#038;from=1&#038;o=desc&#038;cat=203&#038;l=-1&#038;event=productHome&#038;exc=16" title="adobe exchange" target="_blank">Adobe Exchange Repository</a></p>
<p><a href="http://www.ps-scripts.com/bb/">Ps-Scripts</a></p>
<p>Graphicsoft</p>
<p>You may have noticed that some of these sites offer &#8216;Actions&#8217; as well and you might be asking yourself, how does an &#8216;action&#8217; differ from a &#8217;script&#8217;?   Actions (in Photoshop) are a means to record all commands used to generate an effect in Photoshop for the purpose of re-application later. Many people  say that scripts are similar to actions because they can both be used to automate tasks, but scripts can do so much more then what was possible with actions. For starters scripts have conditional logic which makes it possible to automate different outcomes based on various inputs.  Essentially scripting Photoshop is programming and thus it uses various programming languages for results.</p>
<p>So what can you do with scripts?  A few examples are using Photoshop to snatch frame grabs from a <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&#038;loc=en_us&#038;extid=1479020" target="_blank">video source</a>, turning a photo into <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&#038;loc=en_us&#038;extid=1446018" target="_blank">a rainy day</a> or to <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&#038;loc=en_us&#038;extid=1044428" target="_blank">turn RGB values in an image into swatches</a> automatically.</p>
<p>For the purposes of this tutorial I&#8217;ll only deal with JavaScript since it is platform independent (Mac and Windows). Also available are Visual Basic  (Windows) and AppleScript (Mac) commands.</p>
<h1>Adding and Using Scripts</h1>
<ul>
<li>After downloading scripts you&#8217;ll need to install by navigating to <strong>Applications &gt;&gt; Adobe Photoshop CS2 &gt;&gt; Presets &gt;&gt; Scripts</strong>.</li>
<li>Drop your file into the &#8216;Scripts&#8217; folder and launch (or relaunch) Photoshop.</li>
<li>Open your image in Photoshop.</li>
<p><img></p>
<li>Select <strong>File &gt; Scripts</strong> and select the script you wish to use.</li>
<p><img src="http://farm3.static.flickr.com/2159/2438459113_af095437a5_m.jpg"></p>
<li>A dialog window may pop open asking if you want to apply the script.  Click &#8216;yes&#8217;.</li>
<p><img src="http://farm3.static.flickr.com/2159/2438459239_2a055444a8_m.jpg">
</ul>
<p>Bam you&#8217;re done.  Scripting is really that easy.  Now for the harder part.</p>
<p><b>Writing or Editing Scripts</b></p>
<p>Regardless of whether you install a single CS3 application or the entire Creative Suite, two other applications are installed by default: Adobe Bridge  and the ExtendScript Toolkit. The ExtendScript Toolkit is a coding environment that aims to allow you to add new features to Adobe products through scripting.</p>
<ul>
<li>Find the ExtendScript Toolkit. Go to <strong>Applications &gt;&gt; Utilities &gt;&gt; Adobe Utilities &gt;&gt; ExtendScript Toolkit2</strong>. In some rare cases this may not have been installed or deleted.  No worries, the toolkit can be downloaded for <a href="http://www.adobe.com/support/downloads/detail.jsp?ftpID=3206" target="_blank">Macs here</a> and <a href="http://www.adobe.com/support/downloads/product.jsp?product=111&#038;platform=Windows" target="_blank">PCs here</a>.</li>
<p><img src="http://farm3.static.flickr.com/2343/2438457453_61a172693e.jpg"></p>
<li>You&#8217;ll see a window with Photoshop-like palettes on the left and a text editor on the right.</li>
<li>Choose <strong>File &gt; New JavaScript</strong>. This will create a blank file with an area on the right ready for you to type. If you&#8217;re editing a script, instead of creating a new file you would simply open that script instead.</li>
<li>Understanding the window in front of you is critical.  First, the <em>&#8216;Select Target Application&#8217;</em> option tells ExtendScript which application you are writing the script for. In the top left dropdown menu select Adobe Photoshop CS2 or 3 (depending on your version). When asked if you want to start the application, choose &#8216;yes&#8217;.</li>
<li>If you aren&#8217;t familiar with scripting or you&#8217;d like a reference guide, download the <a href="http://partners.adobe.com/public/developer/photoshop/sdk/index_scripting.html">Photoshop JavaScript Reference Guide</a>.
</ul>
<p>This concludes our tutorial.  Stay tuned to this column because in a future lesson I&#8217;ll help you go beyond these steps to actually writing and creating your own scripts from scratch.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark" style="float:left;">
<div class="d131" style="overflow:hidden">
<div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/&amp;title=Understanding+Scripting+in+Photoshop" title="Add to&nbsp;Del.icio.us">Del.icio.us</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/&amp;title=Understanding+Scripting+in+Photoshop" title="Add to&nbsp;Digg This">Digg This</a></div><div id="socialstyles"><a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/&amp;title=Understanding+Scripting+in+Photoshop" title="Add to&nbsp;Stumble">Stumble</a></div></div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.developertutorials.com/blog/javascript/understanding-scripting-in-photoshop-131/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
