Javascript and Actions for Adobe Photoshop

I will get back to talking about painting soon, but first I am going to take a detour through the world of pre-press. Eventually I will tie the two together as I continue to describe my workflow. I have been super busy with several projects, and am looking forward to sharing.

Scripting a workflow
Lately one of the most exciting projects I have worked on has been the conversion of my color separation tools to javascript. I have always used actions to automate the complex processes I use for prepress. Actions are awesome, but really lend themselves to simple processes and rapid creation of  automated sequences. It is also fairly easy to modify an action, which is great for on the fly automation. For the complex processes I have been creating, however, and for sharing these processes, Javascript rules.

Screen Shot 2014-03-15 at 11.10.19 AMAbout Actions
Actions are flexible in their simplicity and ease of use. The downside is that an action is a very linear process, as they only operate through the recorded steps in Photoshop.

To create an Action, open the actions window from the Windows menu. Along the bottom of the Actions window you can see the usual icons  for creating a new item and an item folder. Additionally there are icons for recording, starting and stopping an action. By clicking the New Action icon, (looks like the new layer icon) and clicking record (the round icon) Photoshop will start recording the steps made. Clicking the Square icon will stop the recording, while clicking the play Icon will replay the sequence.

Actions are very handy if you have a lot of images to process in the same fashion, or if you have a complex process that is used often. I will also use actions as a rapid test bed to develop concepts and theories for my prepress work. I can also store ideas about processes I dream up. If you use Photoshop to get work done take a look at Actions. They are simple and fun, and quite powerful. Actions can be saved as action sets, or exported as Droplets. A droplet is a mini app that contains the actions and supports drag and drop for image files.

Screen Shot 2014-03-15 at 11.22.08 AM

About Javascript
Javascript, on the other hand, offers much more flexibility and cross platform compatibility. Javascript files can be loaded into Photoshop by placing them in the scripts folder, within the Photoshop application / presets  folder. Script files are accessed through the Scripts option, under the File menu.

The Javascript variables accessible in Photoshop are documented in the Adobe Javascript reference guide. Writing Javascript for Photoshop is fairly simple in terms of code writing, but beyond the scope of this blog. If you already have a handle on writing code it is worth a look.

Using an existing  script file in your workflow  can be a major time saver. Photoshop comes with several useful scripts already installed.

My work
So far I have converted two complex processes to Javascript. Both SimRip and YRGBK were originally developed as Actions, and distributed in some form using Droplets. Both processes have been staples of my Screen print pre-press work over the last decade, and have been constantly refined. Bringing them into Javascript has added considerable power and flexibility, as well as a better way to share them with the world. I am working hard to bring the rest of my tools to the web, and am excited to share them with you.

To everyone who has provided feedback, comments and encouragement on the new scripts I want to say THANK YOU! You are making it happen! New tutorials are on their way.


Leave a Reply