Chapter nineteen. Automating with Scripts


IF YOU'VE GOTTEN PRETTY FAR WITH PHOTOSHOP ACTIONS, you've probably started running into some of their limitations. Although actions are easy to create, an action can't perform calculations or adjust to various conditions. For example, you can use both an action and a script to scale a layer to a specific size, but only a script can calculate how many of those layers can be duplicated across and down a particular document size, duplicate the layer until you have an entire row of them, and then duplicate the row all the way down the pagesuddenly, you have a page full of business cards in one click.

Scripts are definitely more powerful than actions, but as you might expect, there is a tradeoff: Scripts are harder to create and edit because they consist of lines of code. You have a lot more options, but those options can make it more challenging to perfect a script.

You can make good use of scripts even if you don't know how to write code. Many scripts are available on the Webmany for freeso all you have to do is run those. Also, if you have an idea for a script that doesn't involve calculation or decisions, you can actually use Photoshop to record the script, make a couple of easy changes, and play it back when you need it.

If you have a programming background, you can take advantage of scripting rather easily. If you want to create advanced scripts, but don't have a programming background, you'll need to understand some of the concepts behind scripting that I briefly introduce in this chapter.

Like many Photoshop users, I come from a creative background, not a programming background. In this chapter, I introduce scripting and show how anyone can use it. If you want to write scripts from scratch, you'll need a lot more information than I can fit into this book. Fortunately, Adobe provides extensive scripting documentation with Photoshop. I tell you where to find that and also where to look on the Web for more information.




Working Smart in Adobe Photoshop CS2
Working Smart in Adobe Photoshop CS2
ISBN: 0321335392
EAN: 2147483647
Year: N/A
Pages: 161
Authors: Conrad Chavez

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net