Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Select Parent Text Frames

Enthusiast ,
May 26, 2015 May 26, 2015

Hi,

Is it possible in illustrator to select the parent text frames?

i.e.,

app.activeDocument.selection.parent.selected = true;

Input:

Screen Shot 2015-05-27 at 7.00.32 AM.png

Output:

Screen Shot 2015-05-27 at 7.00.37 AM.png

In Indesign, we use the below code:

app.select(app.selection[0].parentTextFrames[0])

Thanks

Siraj

TOPICS
Scripting
673
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
May 26, 2015 May 26, 2015
LATEST

Here is a sample function I made:

function getTXF (){

  var tg = app.selection;

  app.executeMenuCommand("deselectall");

  var n=0;

  for (var i=0;i<tg.parent.textFrames.length;i++){

  n += tg.parent.textFrames.characters.length;

  if (n>tg.characterOffset) break;

  }

  tg.parent.textFrames.selected = true;

  }

Ten

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines