Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: Change X, Y position of a text frame based on some conditions

$
0
0

Hi

 

I have added Math.round(). But, nothing is happening. Please advice.

 

var myDocument=app.activeDocument;

var myPages=myDocument.pages;

    for(p=0;p<myPages.length;p++) {

 

    var allTextFrames=myPages[p].textFrames;

        for (s=0; s<allTextFrames.length; s++) {

                    var myTextFrame = allTextFrames[s];

                    var myTextFrameBounds =  myTextFrame.geometricBounds;

                    var properly_aligned = "54 pt";

                        if (Math.round(myTextFrameBounds[0] == "103.89 pt") && Math.round(myTextFrameBounds[1] =="216.425 pt")) {

                            myTextFrame.move ( ["216.425 pt","54 pt"] );

 

                         } 

                                                      

                }

    }


Viewing all articles
Browse latest Browse all 37788

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>