Photoshop CS scripting problem

I’m trying to take a jpeg and save it as an EPS in Photoshop CS. I keep getting “invalid enumeration value” error everytime I run the script and it won’t save the file. If I try to save it as a JPEG instead of an EPS it works fine. Any help would be greatly appreciated.

tell application "Adobe Photoshop CS"
	set targetFolder to choose folder with prompt ¬
		"Location for exported files"
	set targetPath to targetFolder as string
	set documentName to name of document 1
	change mode of document 1 to CMYK
	if resolution of document 1 < 250 then
		save current document in file (targetPath & documentName) as EPS ¬
			with options {class:EPS save options, encoding:binary, preview type:eight bit Mac OS}
	else
		display dialog "Invalid Image"
	end if
end tell

I’ve tried, and tried, and tried to figure this one out, but couldn’t. It gets hung up on “as EPS.” My only suggestion to you is post this question on the Photoshop Scripting forum at Adobe.

I figured it out Carl. Instead of “as EPS” it should be “as Photoshop EPS”. That solved the problem. Thanks for the reply.

That’s good. It’d be nice if that was specified in the Photoshop dictionary. :lol: