Salir
  • Comunidad global
    • Idioma:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

Need InDesign Script for Overset text flow

Explorador ,
Apr 18, 2024 Apr 18, 2024

Hi All.

 

I need to script for overset text flow.

 

Please find the attached sample file and screenshot.

 

 

Thanks...

TEMAS
Scripts
1.8K
Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines

correct answers 1 respuesta correcta

Community Expert , Apr 18, 2024 Apr 18, 2024

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.

Traducir
Community Expert ,
Apr 18, 2024 Apr 18, 2024

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.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Apr 18, 2024 Apr 18, 2024

@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. 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Apr 18, 2024 Apr 18, 2024

@brian_p_dts 

 

Isn't checking if Story overflows is a better way?

 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Apr 18, 2024 Apr 18, 2024

@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. 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Apr 18, 2024 Apr 18, 2024

@brian_p_dts

 

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?

 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Apr 18, 2024 Apr 18, 2024

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. 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Apr 18, 2024 Apr 18, 2024

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. 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
Apr 18, 2024 Apr 18, 2024

@brian_p_dts

 

If you are 100% sure then yes.

 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Community Expert ,
Apr 18, 2024 Apr 18, 2024

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.

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Explorador ,
Apr 26, 2024 Apr 26, 2024

Thanks for All

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Aficionado ,
May 09, 2024 May 09, 2024

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

 

William Campbell
Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
May 09, 2024 May 09, 2024

@willcampbell7

 

You shouldn't be iterating through TextFrames collection - but Stories collection.

 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Aficionado ,
May 09, 2024 May 09, 2024

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.

 

William Campbell
Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
May 09, 2024 May 09, 2024

@willcampbell7

 

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. 

 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Aficionado ,
May 09, 2024 May 09, 2024

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.

 

William Campbell
Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
LEYENDA ,
May 09, 2024 May 09, 2024

@willcampbell7

 

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.

 

Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines
Aficionado ,
May 09, 2024 May 09, 2024
MÁS RECIENTES

Script is updated to iterate stories instead of text frames.

https://www.marspremedia.com/software/indesign/resolve-overset-text

 

William Campbell
Traducir
Informe
Directrices de la comunidad
Sé amable y respetuoso, muestra títulos de crédito de la fuente de contenido original y busca duplicados antes de publicar. Más información
community guidelines