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

Find overflow Text

New Here ,
Sep 02, 2012 Sep 02, 2012

Copy link to clipboard

Copied

Hi every one

is there a script that help to find the text boxes with overflow text (like in indesign with overset text)

TOPICS
Scripting

Views

6.1K

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 , Sep 12, 2012 Sep 12, 2012

OK, now that I see your document, I see the problem. My script was set to skip unnamed flows, and your callouts are in unnamed flows, which is fine. Here is the modified script:

var doc = app.ActiveDoc;

var flow = doc.FirstFlowInDoc;

while (flow.ObjectValid()) {

    var textFrame, subCol;

    // Get the last TextFrame and its last Sub Column.

    textFrame = flow.LastTextFrameInFlow;

    subCol = textFrame.LastSubCol;

    if (subCol.Overflowed === 1) {

        alert ("TextFrame is overflowed.");

    }

   

...

Votes

Translate

Translate
Community Expert ,
Sep 03, 2012 Sep 03, 2012

Copy link to clipboard

Copied

In FrameMaker, it is sub columns (children of text frames) that have an Overflowed property. You can use something like this to see how it works:

var doc = app.ActiveDoc;

var flow = doc.FirstFlowInDoc;

while (flow.ObjectValid()) {

   

    var textFrame, subCol;

   

    // Skip unnamed flows.

    if (flow.Name !== "") {

        // Get the last TextFrame and its last Sub Column.

        textFrame = flow.LastTextFrameInFlow;

        subCol = textFrame.LastSubCol;

        if (subCol.Overflowed === 1) {

            alert ("TextFrame is overflowed.");

        }

    }

    flow = flow.NextFlowInDoc;

}

In reality, you will have to do something more practical when you find an overflowed sub column, like select it and scroll to it. Please let me know if you have any questions or comments. Thanks.

Rick

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 ,
Sep 03, 2012 Sep 03, 2012

Copy link to clipboard

Copied

Dear Rick

Thanks for your reply but I couldnt make it work.

I am using framemaker 10 and I have imported your script on new script file and when I tried to run it, it didnt give me any results at all.

I am sure i am doing something wrong

can you give me some details how i run it?

thanks for you hard work

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 ,
Sep 04, 2012 Sep 04, 2012

Copy link to clipboard

Copied

Can you post a link to a sample document? Thanks.

Rick

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 ,
Sep 12, 2012 Sep 12, 2012

Copy link to clipboard

Copied

Dear Rick

here is a sample

https://www.yousendit.com/download/TEhXT204NDI1R1BWUThUQw

sorry for being soo late

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 ,
Sep 12, 2012 Sep 12, 2012

Copy link to clipboard

Copied

OK, now that I see your document, I see the problem. My script was set to skip unnamed flows, and your callouts are in unnamed flows, which is fine. Here is the modified script:

var doc = app.ActiveDoc;

var flow = doc.FirstFlowInDoc;

while (flow.ObjectValid()) {

    var textFrame, subCol;

    // Get the last TextFrame and its last Sub Column.

    textFrame = flow.LastTextFrameInFlow;

    subCol = textFrame.LastSubCol;

    if (subCol.Overflowed === 1) {

        alert ("TextFrame is overflowed.");

    }

    flow = flow.NextFlowInDoc;

}

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 ,
Sep 13, 2012 Sep 13, 2012

Copy link to clipboard

Copied

Dear Rick

yes it works, it like a dream for me

I am grateful to you, thanks

but may I ask for more from you?

Can you make it to select the text box that has overflow or even go to the page the has overflow text?

Thanks again really thanks

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 ,
Sep 13, 2012 Sep 13, 2012

Copy link to clipboard

Copied

Here is how to select the text frame.

textFrame.GraphicIsSelected = 1;

You can go to the page by using something like this with FrameScript:

Set doc.CurrentPage = textFrame.Page;

Unfortunately, ExtendScript doesn't have this .Page shortcut, so you will have to figure out how to navigate from the textFrame object to the Page object. If your text frames are always in an anchored frame directly inside the main text flow, then it is pretty straightforward. However, you may want to make a general purpose function where you can find the Page object for any FrameMaker object, regardless of where it is on the page. You should pose this as a separate discussion on the list. If I have time, I will try to work out the code for you.

Rick

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 ,
Sep 15, 2012 Sep 15, 2012

Copy link to clipboard

Copied

I made a general purpose function for finding the parent page of any FrameMaker object. You can find the function here:

http://forums.adobe.com/message/4701818#4701818

With this function, the ExtendScript equivalent to my FrameScript code above would be something like this:

// Scroll to the text frame's page.

doc.CurrentPage = getPage(textFrame);

Rick

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 ,
Nov 05, 2012 Nov 05, 2012

Copy link to clipboard

Copied

Dear Rick

long time since I replied to you but It really works the whole script is working nicely

really thanks for all the help and I hope in good health and well

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 16, 2014 Dec 16, 2014

Copy link to clipboard

Copied

Would you mind reposting the full script that is working for you? I can't seem to get it to work properly. Will it work with both named and unnamed flows?

Ideally, I want the script to search an entire book for text overflows (similar to Edit > Find/Change and Edit > Find Next), and scroll any overflow into view.

Thanks for any help.

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
Participant ,
Apr 10, 2016 Apr 10, 2016

Copy link to clipboard

Copied

Dear Rick,

i hope you are doing well, is it possible to adjust your code to find overflow text in table cells because your code doesn't get it

Thanks

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 ,
Apr 10, 2016 Apr 10, 2016

Copy link to clipboard

Copied

Hi Susan,

Can you post a sample document? Thanks.

Rick

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
Participant ,
Apr 11, 2016 Apr 11, 2016

Copy link to clipboard

Copied

Dear Rick,

Thanks for your reply and i hope you can help me at this case

you find a sample file uploaded at below link

http://www.megafileupload.com/rsYN/Sample_file.zip

first i want the code to tell me that there is overflow text on page (1) as shown  and select both those text frames one by one

2.png

then ( and that is more important) there are overflow text on three cells as shown but i can't know that until i resize the row format from 5 to 7 or read the text and guess if the context is missing

1.png

Thanks in advance for your help

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 ,
Apr 11, 2016 Apr 11, 2016

Copy link to clipboard

Copied

I got a virus warning when I tried to download your file. There are a couple of things to look at:

1) There is an Overflowed property for table cells. So you can loop through the table cells in the document and look for this property's value.

2) There is a RowMaxHeight property that you can set higher than the 5.0 mm setting as shown in the screenshot.

I hope this helps. -Rick

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
Participant ,
Apr 11, 2016 Apr 11, 2016

Copy link to clipboard

Copied

Dear Rick,

i have uploaded file again to google drive and scanned it carefully and no viruses appeared

https://www.drive.google.com/open?id=0B5IdYdTSWRylQmsyWXBjTDhCSUk

about second thing you mentioned are there any script can edit this value for all table cells (row format)  to be more than 5.0mm or equal = 50 for ex.

about case number 1 i mentioned on screenshot what about it??

Thanks in advance

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
Participant ,
Apr 11, 2016 Apr 11, 2016

Copy link to clipboard

Copied

Dear Rick,

i have uploaded file again to google drive and scanned it carefully and no viruses appeared

about second thing you mentioned are there any script can edit this value for all table cells (row format)  to be more than 5.0mm or equal = 50 for ex.

about case number 1 i mentioned on screenshot what about it??

Thanks in advance

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 ,
Apr 11, 2016 Apr 11, 2016

Copy link to clipboard

Copied

LATEST

Hi Susan,

You should have enough information to try to code this yourself. Right now I don't have time to provide any more free help on this. I am sorry about that. If you have budget for some paid help, please contact me offlist. Thank you very much.

Rick

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