PS Scripting - Batch .eps and .tif files

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

Moderators: xbytor, Kukurykus, Tom


PS Scripting - Batch .eps and .tif files

Post by kungxiong5 »

Hi Everyone,

I've tried building photoshop scripts on my own but I am stuck. Basically I want to run a batch on eps files without having to click okay for the size of the eps every time it comes up. I have already created the set of what I want the eps to do. However I have a vertical and horizontal action down below that continue to run once eps has been converted. Any other files like jpgs, png, gif, tiffs run just fine.

In the end if it is a eps then run a special okay action if not then run the regular action or continue.

Note: some tutorials keep wanting me to put the location of the batch files in the script but I do not want to do that since it'll cost me more work and checking "Suppress File Open Options Dialogs" in Photoshop squeezes the image to look wierd.

Hopefully I am being clear with my blog.

This is my script down below. I did not finish the script because I do not know how to make the eps files talk with photoshop scripting.

app.displayDialogs = DialogModes.NO;
var epsOpenOptions = new EPSOpenOptions
epsOpenOptions.antiAlias = true
epsOpenOptions.mode = OpenDocumentMode.RGB
epsOpenOptions.resolution = 300
epsOpenOptions.constrainProportions = true
var strtRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.INCHES;

var Web_Action = 'Web_Action_Mac'; (Web_Action Mac is just the name of my action)
var Vertical = 'Web_Action_Mac';
var Horizontal = 'Web_Action_Mac';

if (activeDocument.width > activeDocument.height )
app.doAction ("Horizontal", "Web_Action_Mac");
// alert('small'); // or issue a message
doAction ("Vertical", "Web_Action_Mac");
preferences.rulerUnits = strtRulerUnits;