Skip to main content
allisonblake
Known Participant
October 14, 2009
Question

AS/CS3 open document without showing window

  • October 14, 2009
  • 2 replies
  • 826 views

Hi everyone,

I'm pretty new to scripting and mostly I've used Applescript to script InDesign.

In InDesign you can open a file without showing the window, which often speeds up the script.

I cannot figure out how to tell Photoshop to open a file without showing the window.

Is this possible?

thanks!

This topic has been closed for replies.

2 replies

Inspiring
October 14, 2009

With CS4 you can also toggle the panels and set image zoom to .25% to speed up the script.

togglePalettes();
setZoom( .25 );
function setZoom( zoom ) {// as percent
   cTID = function(s) { return app.charIDToTypeID(s); }; // from xbytor
   var docRes = activeDocument.resolution;
   activeDocument.resizeImage( undefined, undefined, 72/(zoom/100), ResampleMethod.NONE );
   var desc = new ActionDescriptor();
   var ref = new ActionReference();
   ref.putEnumerated( cTID( "Mn  " ), cTID( "MnIt" ), cTID( 'PrnS' ) );
   desc.putReference( cTID( "null" ), ref );
   executeAction( cTID( "slct" ), desc, DialogModes.NO );
   activeDocument.resizeImage( undefined, undefined, docRes, ResampleMethod.NONE );
}

// your code here

togglePalettes();


If you where using javascipt you could also place all you code in a string and suspendHistory to speed it up a little more.

Inspiring
October 14, 2009

Not possible.

However, if you are running a large batch of images, you may be able to iconize/hide photoshop manually and acheive a similar effect.

The image never makes it to the screen and the palettes are never updated. This can make a big difference in performance.