2 Replies Latest reply on Nov 19, 2017 11:08 PM by Adul Kokapan

    How can I use refer to or use width and height of other object?

    Adul Kokapan

      I'm currently working on this code

       

      var doc = app.activeDocument; 

       

      var textRef1 = doc.textFrames.pointText([300,1000]);

      textRef1.contents = "First para text \rFirst para text \rFirst para text \rFirst para text  \rFirst para text";

       

      var textRef2 = doc.textFrames.pointText();

      textRef2.contents = "Second para text"; 

       

      The code is simple just to create point text or maybe rectangle or texframe below "textRef1". But I don't know how to get height and width value of "textRef1"

      Later I will have to create rectangle background as well so I really have to know those value.

       

      Can you please teach me how to do it?