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)
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.");
}
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
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
Copy link to clipboard
Copied
Can you post a link to a sample document? Thanks.
Rick
Copy link to clipboard
Copied
Dear Rick
here is a sample
https://www.yousendit.com/download/TEhXT204NDI1R1BWUThUQw
sorry for being soo late
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;
}
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
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
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
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
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.
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
Copy link to clipboard
Copied
Hi Susan,
Can you post a sample document? Thanks.
Rick
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
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
Thanks in advance for your help
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
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
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
Copy link to clipboard
Copied
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