Photoshop Automate Batch

This is either dicey or simple. I just can’t get it either way:

In CS2 the command Batch is in the Applescript dictionary.
I need to Automate one my actions as part my script.
Any help is appreciated.

Not sure if this is what your looking for but here goes!
To run an action you need to call the action in your script with this line.

do action "name of action" from "name of set"

The names of action and set are case sensitive…

Thanks for the reply Pidge.
I’ve been using do action command, which does a fine job at manipulating a single document at a time. Then I found the “batch” command in the Photoshop applescript library. I’m not sure how to work it. It looks as though it should act the same way as File>Automate> command from the Photoshop menu.

I was thinking

“Do batch”, or “Set Batch”, or “Set Folder to”, then … something


Hi Action

Not sure about the batch command but if you have a lot of files to process thru your action in photoshop you
can use a repeat loop in your script to resolve this!

That’s a good idea. I’ll look into that. I think the only thing I need to avoid is the file copying over the previous file created. I could do some renaming as well.

Hi Action

Overwriting the file shouldn’t be a problem if you save to another folder or change the extension like from a .eps to .jpg
Here’s a little script for changing a bunch of files dropped on it to really small lo-res jpegs,
you might be able to pull it to bits to get some usefull stuff from it…

on open theFiles
	repeat with theFiles in theFiles
		set myfile to (path to desktop folder) as string
		tell application "Adobe Photoshop CS"
			open theFiles
			set display dialogs to never
			set thisdoc to current document
			if (mode of thisdoc is not RGB) then
				change mode thisdoc to RGB
			else if (mode of thisdoc is RGB) then
			end if
			tell thisdoc
				resize image width pixels 142.0 resample method bicubic resolution 72
			end tell
			set myoptions to {class:JPEG save options, quality:12}
			save thisdoc in myfile as JPEG with options myoptions appending lowercase extension without copying
			close current document saving no
		end tell
	end repeat
end open