1 Reply Latest reply on Apr 16, 2015 7:17 AM by Stefan Rakete

    which column [left or right] presented my current text frame and how to identify?

    Jackkistens

      Dear All,

       

      Which column [left or right] presented my current text frame and how to identify?

       

      please suggest anyone.

       

      regards,

      ~jack

        • 1. Re: which column [left or right] presented my current text frame and how to identify?
          Stefan Rakete Level 2

          Bildschirmfoto 2015-04-16 um 16.01.59.png

           

          Assuming you have a left frame and a right frame on a single page (see image attached).

          Then you can define a center, select a textFrame and run the following script:

           

           

          var CENTER = 105;

          var curTextFrame = app.selection[0];

          var curGeometricBounds = curTextFrame.geometricBounds;

          var curLeftBound = curGeometricBounds[1];

          var curRightBound = curGeometricBounds[3];

           

          if (curRightBound < CENTER && curLeftBound < CENTER) {

              alert("LEFT TextFrame");

          } else {

              alert("RIGHT TextFrame");

          }

           

          Hope this is, what you were asking for

          Thanks Stefan