Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Select textframe on basis on textFrame.id

$
0
0

Dear All,

 

I want to assign a variable myFrame to one of the textFrame present in a page by textFrame.id.

 

var myDoc = app.documents.item(0);

var i;

 

for(i=0; i < myDoc.textFrames.length; i++)     // three text frames i have in myDoc (only one page)

     {

          var myFrame = myDoc.textFrame[i]

          alert(i + " " + myFrame.id);   // here I get number like 845, 869, 205

          if (myFrame.id == 845)

          {

              myFrame.select();

          }

     }

 

 

So now I knew three id of three textframes so how i can assign/select that frame to a variable, which has id 869.

 

myFrame1 = myDoc.textFrames.id(869);  // assign does not work here //need code for that

myFrame1.select()

 

 

Virender


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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