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

Script to add a linked textframe to a selected textframe

New Here ,
Dec 19, 2020 Dec 19, 2020

Copy link to clipboard

Copied

In short: Is there a way to add a linked textframe with predefined geometricBounds to a selected textframe?

 

For a newspaper, I have to perform these repetitive tasks:

  1. Create textframe and paste the newsarticle in plain text.
  2. Add the 'then next style' paragraph styles (for location, articletitle, leadtext, article and signature).
  3. Divide the textframe into parts (location has to be it's own textframe, the title needs his own textframe, the leadtext also, etc....)

 

I've already set up a script that cleans up the text and prepares it for further use.

I would like the script to add the needed linked textframes.

 

Many thanks ahead

TOPICS
Scripting

Views

340

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Dec 19, 2020 Dec 19, 2020

Yes, there's a way.

 

textFrames.add({geometricBounds: [y1,x1,y2,x2]})

 

Adds and returns a new text frame at the defined coordinates. 

 

textFrame.previousTextFrame = oldTF

 

makes that new text frame connected to the previous. 

Votes

Translate

Translate
Community Expert ,
Dec 19, 2020 Dec 19, 2020

Copy link to clipboard

Copied

Yes, there's a way.

 

textFrames.add({geometricBounds: [y1,x1,y2,x2]})

 

Adds and returns a new text frame at the defined coordinates. 

 

textFrame.previousTextFrame = oldTF

 

makes that new text frame connected to the previous. 

Votes

Translate

Translate

Report

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
New Here ,
Dec 20, 2020 Dec 20, 2020

Copy link to clipboard

Copied

Thank you!

It took some time to make it work, but it does the job!

Votes

Translate

Translate

Report

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
Community Expert ,
Dec 20, 2020 Dec 20, 2020

Copy link to clipboard

Copied

You're welcome. Newspapering is fertile ground for automation and where I cut my teeth on this stuff. Lots of trial and error!

Votes

Translate

Translate

Report

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
New Here ,
Dec 20, 2020 Dec 20, 2020

Copy link to clipboard

Copied

LATEST

Indeed, it's not just about layouting as quick as possible, but also maintaining flexibility for last minute adjustments. Thanks again!

Votes

Translate

Translate

Report

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