Creating a common action to make GIFs with/without Paths

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

Rocket Boy

Creating a common action to make GIFs with/without Paths

Post by Rocket Boy »

javascript:emoticon(':D')

My first post here @ PS-Scripts...thanks for the web site!

Is it possible to create a droplet to for example: Open image>Convert Mode>Image size 72ppi>Path 1 make selection>Inverse>Delete Background>Save as GIF with transparency>Close. My dilema is that I do have a droplet to this very task and it works. However when the folder of images that the droplet is working on contains a file without a "Path" it stops with an error. I would like to know what I can do to customize this action to skip over the "Path" steps when it comes across an image without a path and still save it as a GIF. Can this be done in a droplet or do I have to create a script?

Thanks in advance!
[/b]
Mike Hale

Creating a common action to make GIFs with/without Paths

Post by Mike Hale »

There is no way to skip steps in an action while the action is running.

What you can do is copy the action you have now and edit it so that you have one action for doc with paths and one for docs without.

Save the code below as a plain text file with the extension .js

Make a new action in the set your other to gif actions are in that runs the new saved script.

If you like you can make a droplet of the script action.

Note you will have to change the names of the actions/sets in the code to match whatever you're using

Code: Select allif (app.activeDocument.pathItems.length == 0){
   doAction("nopath","makeGIF");// action name, action set
   }
else{
   doAction("withpath","makeGIF");
   }

Mike