Skip navigation
Currently Being Moderated

activate an existing document

May 14, 2012 11:03 PM

Hi,

 

For example: I have opened 10 documents at a time. But I have to get active one of an existing document.

How do i get activate a particular existing document by name through Photoshop scripting?

so could you please help me on this...

 

thanks in advance,

Rajiv.s

 
Replies
  • Currently Being Moderated
    May 15, 2012 2:24 AM   in reply to mangalarajiv

    app.activeDocument = app.documents.getByName( 'Foo' );

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 24, 2012 1:44 AM   in reply to mangalarajiv

    alert(getActiveDocumentIndex())  // it  gives the index number

     

    function getActiveDocumentIndex(){

         var ref = new ActionReference();

         ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );

         return desc = executeActionGet(ref).getInteger(stringIDToTypeID('itemIndex'))-1;

    }

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points