1 Reply Latest reply on Dec 15, 2010 4:12 AM by Muppet Mark-QAl63s

    Select document by name

    Ghoulfool Level 1

      In a scenario where there are multiple documents open, remind me how to select a document by it's name (assuming we know it's file name and have opened the document previously in the script). ScriptListener isn't much help:

       

      // =======================================================
      var id810 = charIDToTypeID( "slct" );
          var desc191 = new ActionDescriptor();
          var id811 = charIDToTypeID( "null" );
              var ref139 = new ActionReference();
              var id812 = charIDToTypeID( "Dcmn" );
              ref139.putOffset( id812, 1 );
          desc191.putReference( id811, ref139 );
      executeAction( id810, desc191, DialogModes.NO );


      and I don't want to be referencing the documents in the the order that they are opened (which I understand is the usual way this is done).

       

      Cheers