Copy link to clipboard
Copied
You don't need a script.
When you place text hold the Shift key when you click the loaded sursor to auto-flow the entire content, or hold the Alt/Opt key to flow one page/frame and leave the cursor loaded.
In your current situation, withthe text tool click the red plus sign in the outport of your frame that has the overset text to load the cursor, then proceed as above.
This is very basic and should be covered in any introductory InDesign training, and is certainly covered in the help files.
Copy link to clipboard
Copied
You don't need a script.
When you place text hold the Shift key when you click the loaded sursor to auto-flow the entire content, or hold the Alt/Opt key to flow one page/frame and leave the cursor loaded.
In your current situation, withthe text tool click the red plus sign in the outport of your frame that has the overset text to load the cursor, then proceed as above.
This is very basic and should be covered in any introductory InDesign training, and is certainly covered in the help files.
Copy link to clipboard
Copied
@Peter Spier has the right answer for what you have shown and provided. If you are trying to learn about scripting, a given TextFrame object has a boolean .overflows property that can be checked.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
@Robert at ID-Tasker Guess it depends on the use case. Typically when I'm engaged in overflow shenanigans without Smart Reflow, I'm use nextTextFrame and previousTextFrame properties to link things up.
Copy link to clipboard
Copied
But when working with text - you should work on Stories?
Checking TF in the middle is rather pointless?
Not sure about performance gains, but checking ParentStory for overflow is more universal?
Copy link to clipboard
Copied
When I get up these shenanigans, I usually know that the text frame I'm on is the last. A middle text frame that's already linked to next will not show as overflowed. Mostly I just rely on Smart Reflow though.
Copy link to clipboard
Copied
Also, usually I am iterating through unlinked TFs on a given page to see if any is overflowed, and act accordingly (a recent custom label project comes to mind). If we're iterating through TFs already, and we know they are unlinked, then going up to parent story to check overflow seems less efficient.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ou have got the correct answer. But your document has no styles. It is important to use object, paragraph and charactr styles.
You should also consider to use primary text frames and layers.
Copy link to clipboard
Copied
Thanks for All
Copy link to clipboard
Copied
The correct answer works when adding new text. To find overset text after the fact, I made a script to help:
https://www.marspremedia.com/software/indesign/resolve-overset-text
Copy link to clipboard
Copied
Copy link to clipboard
Copied
The collection iterated isn't important. But yes, which overflows property is examined makes all the differerence. See line 213:
if (doc.textFrames[i].parentStory.overflows) {
Checks 'parentStory' property., not the frame's overset property. Look closer at the code. If the parent story overflows, the last text frame for the story is added to an array of oveset text frames, which are then processed. For me, the script works precisely as designed.
Copy link to clipboard
Copied
Let's say you have 5 Stories - each one has 100 TextFrames - your code will check all 500 TextFrames, right?
If you check if Story overflows - you'll do only 5 checks.
Copy link to clipboard
Copied
OK I see your point. Both paths arrive at the same conclusion, but yes, stories is more efficient. I'll rework it some. Thank you for pointing that out.
Copy link to clipboard
Copied
TextFrame can't exist on its own - there is always a parentStory - so if you need to work on text objects in the document - you should work on Stories - or even better - story..texts[0] - to make your code more universal.
Copy link to clipboard
Copied
Script is updated to iterate stories instead of text frames.
https://www.marspremedia.com/software/indesign/resolve-overset-text