2 Replies Latest reply on Apr 4, 2016 11:24 AM by Prithivi_Prepress

    select a text frame with lable

    Prithivi_Prepress Level 1

      I am trying to catch a text frame from document page 2 with script label "main text" but below script is not working.


      app.activeDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;

      app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;

      app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.spreadOrigin;





      var jt=app.activeDocument.pages[2].textFrames;

      for (i=0;i<jt.length;i++)

      if (jt[i].label=="Main Text")




          alert("nothing happened");




      Can some one please help me what is the error here.