Find block of text frames in the document

Hi all

I created the 30 page document, it contains the two frames of threaded related texts and No threaded frames of related texts. I have to write script tool to find UN threaded text frames and anchor to the next to go down with the content frame.

Any help will be greatly appreciated.

Thanks in advance

Hello

I don't know what specific solution can be found using ID 2014 CC features in the user interface, but a generic way might be to create a function and call it for each page of a doc. The function would be:

  • collect all pageItems (table)
  • Sort by geometricBounds [0] value (ascending)
  • Browse and:
  1. each active element of time is that a girl textFrame ==> placed his last PointInsertion as a destination
  2. otherwise ==> Miller point in current destination (not sure if original visibleBounds are essential to be copied)

It assumes that the order of the pageItems can rely on its superior position.

Jarek

Tags: InDesign

Similar Questions

  • erase empty text frames in the document

    I have several blocks of empty text in my documents. I want to erase them with a script.

    I have try this script but it returns an error sometimes "delete..." "not an object".

    this: (it's BAD CODE DO NOT COPY).

    {
    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = "\\A\\Z";

    var blocsvides = app.activeDocument.findGrep (true);

    for (var i = 0; i < blocsvides.length; i ++)

    blocsvides [i] .parentTextFrames [0]. Remove() / / <-in this line, there is an error

    }

    There are a lot of images in my documents, image, text, and the indefinite object with color too.

    Thanks for helping me. :-)

    Julien.

    This should leave visible frames:

    var noColor = app.documents[0].swatches.item(0);
    var stories = app.documents[0].stories.everyItem().getElements();
    for(var i=0;i 0){continue}
          c.remove();
        }
      }
    }
    
  • block of text related to the enumeration

    in a single document, there are several built-in text block (object applied style = "myObjSty1")

    I want to write an increasing number

    I tried to write, but does not

    Can you help me with this

    Thanks in advance

    var sNo = 1;
    var doc = app.activeDocument;  
    app.findGrepPreferences = app.changeGrepPreferences = null;  
    app.findGrepPreferences.findWhat = "~a";  
    var found = doc.findGrep();  
    for(var i =found.length-1;i>=0;i--)
    {
    if(found[i].allPageItems[0].appliedObjectStyle == myObjSty1)
    {
         found[i].texts[0].select();
         app.changeGrepPreferences.changeTo = (++sNo);
         app.selection[0].changeGrep();
    }
    }
    

    1. you define the if clause inside the loop for.

    2. you must set each block of text by its index

    3. you need a meter to advance whenever a match is found

    //Object style is named "MyObjectStyle1"
    //It is not nested in an ObjectStyleGroup !!
    var myObjSty1 = app.documents[0].objectStyles.itemByName("MyObjectStyle1");
    
    //Selection is the text frame or some text of the story you want to get the anchored text frames:
    var myStory = app.selection[0].parentStory;
    //Collecting ALL anchored text frames of the story to an array:
    var myAnchoredTextFrames = myStory.textFrames.everyItem().getElements();
    
    //Define a start number:
    var myStartNumber = 1;
    
    //Loop through the array of the text frames anchored:
    for(var n=0;n
    

    Uwe

    PS. : He should really look at more in the basics of JavaScript before you do more work in ExtendScript.

  • CS4 automatically resize the height of the text frame to the baseline of the last line of text

    Hello

    Does anyone know of a script that automatically resizes all the heights of text frame in a document so that the bottom of each text block falls on the baseline of the last line of text in the text block? The image height must be determined by the text appearing and does not effect excess or stories of threads.

    Thank you!!

    Chung

    As text blocks have a property 'lines', lines have a property 'base' and executives have a 'geometricBounds' property, this quickly written javascript should do the trick for a block of selected text:

    app.selection[0].geometricBounds = [app.selection[0].geometricBounds[0],app.selection[0].geometricBounds[1],app.selection[0].lines[app.selection[0].lines.length-1].baseline,app.selection[0].geometricBounds[3]];
    

    (Whaddoyouknow: it can be done in one line)

    So let's loop over all the text blocks in your current document:

    allf = app.activeDocument.textFrames;
    for (f=0; f		   
  • How can I transfer text frames of the legend of the Slide Master view to view the film?

    I am a new user of Captivate.

    I created my own master slides. Many of them have blocks of text. My intention was to have the text frames appear whenever I have created a new slide in the Filmstrip view. Instead, I see just the text that I wrote (Insert text "here") in the background. I can't click and change the text in the view of the Film Strip.

    Could someone help me please? How can I make my text in the view of master frames appear as blocks of text whenever I create a new slide in the Filmstrip mode?

    Thank you.

    Levi

    If you want to "text frames", where the text can be changed in the view of the Film Strip, you must insert placeholders on the master slide. You probably insert text captions.

    Anthony

  • graphic block obscures text frame, even if the text is on a higher layer

    I have a page of photos, each in its own framework and each with its own text block containing the caption for the photo. Behind all this and covering most of the page, I created an image of basic graphics in which I placed a picture as the background. I've done several times before, as recently as last month. This time, for some reason some unfathomable background obscures the text captions, as if the background was on a top layer (but it isn't). But he isn't obscuring the photos, only the legends. Another strange thing: InDesign error text in excess, which is clearly not. I tried to juggle the autour layers to see if that would solve the problem. No dice. The only thing that makes visible captions is to completely remove the graphic block. I tried just using a fill color in the frame, instead of the photo in the background, but the result is the same. I also tried to reduce the opacity of the fill/photo, but all that is to reduce the color in the white frame (the color of the page), it doesn't make transparent. I can make the image smaller, and this makes the text 'behind' it visible. But the color/background < rectangle > is the purpose of down in the layers list. It just does not behave like that. One last thing: I can go to the layers palette and hide the rectangle of <>by clicking the eyeball, but she is hiding it, it does not show the text 'behind' she captions. I suspect that an update shifted to creative cloud can be loaded here.

    You have the text wraps not enabled for your background image, it pushes the text out of the text frame, which, of course, is causing overset text and you you see is not the text more. Select the inage background, choose the skin for Windows and click the more to the left to turn it off.

  • Blocks of text added to the elements in my Indesign library?

    Hey,.

    When I put design elements (even a simple text so that I can, say, save a title font I like for a specific item) in my library of re - use later, when I get out they have a huge text block on the, which I then delete manually. It is a pain. I might as well keep a Notepad next to my computer and write things I like and redo them every time if I have to get dirty with the elements I shoot off to the library anyway.

    Anyway I can just stop doing that? I wish that the item I put in the library must be THE SAME item when I go out. I feel there is some setting somewhere I can not find the cause.

    I use CS6, incidentally.

    Salah Fadlabi wrote:

    Try opening the object with no document open style, double-click any, then close and open indesign. All the images after that this process will be borderless.

    This is justified for new created document, not for those that already exist. If existing existis problem in a document, you need to change the default style, no object selected.

    I highly recommend to create its own styles of base for each category and load them in several panels style always have styles with the same name in all the documents that facilitates the exchange of points.

    Default object styles are the ones with the small rectangle to the right graph. The one with the ist T for text blocks, one without T for the picture frames.

  • InDesign: how tilt blocks of text without distorting the text?

    I want to put in place several large blocks of copy to these requirements:

    -the basic lines of the text are at an angle on the page

    -the left and right edges of the text block are shot-on horizontal (aligned with the guides in the screenshot below)

    -the block of text can be enlarged or reduced without changing the angle of the left and right edges

    -forms of the letters themselves are not distorted

    Skew1.gif

    This screenshot shows what I'm after.

    Skew2.gif

    This screenshot shows the real bounding box for the text block.

    Skew3.gif

    This screenshot shows how the angle of the text box changes when I change its size.

    I think Illustrator is a kind of function that allows you to "zero" (reset the transformations of a grid of 90 degrees) an object after it is transformed. Not finding anything like that in InDesign. And I find no way to set a custom angle constraint that would allow me to use the direct Selection (white arrow) tool to change the height or width with confidence.

    I'd appreciate some tips! Thank you for your attention.

    I do so with the example of shooting. Tilt works the same way.

    1. draw your rectangle, I applied a text frame reference grid (textframe options)

    2. with the Selection tool or the transform tool turn the frame in one direction, you can also do this with the entrance of the value in the transform Panel, what I would recommend.

    3. now, select the direct Selection (white arrow) tool and hold the ALT key and click on the frame. Now, only the frame is selected. Turn the other way, or insert the value in the transform Panel.

    I also have another method to offer:

    1. Draw the main frame with the text tool.
    2. Draw a small box above, it must be much smaller than the main frame.
    3. Turn the small frame in the direction that where you want to go the text.
    4. Select the two images.
    5. Go to the Pathfinder > Add.

    Now, you can add text or select a text based frame reference grid. He will do the same as above. May be simpler.

  • Adding pages and blocks of text to emulate the behavior of "Smart Text Reflow"

    I create a large number of tables in a document.  If I'm Smart Text reflow on, my script is malfunctioning.  I have the start of treatment:

    1. Add a new table

    2. If the last block of text of page overflowing and then add a new page

    With smartTextReflow off, I want to assure that the executives of new blocks of text which corresponding to the main text of the page master.  It must be able to manage to get the settings from the page of left/right text block.

    I have solved my problem.  I was overthinking things!

    Given that I have selected blocks of text on master pages as the main text blocks, when you create a new page, a block of text is automatically created. So the problem is then simply connect the block preceding text for the text block that was created when the page is added.

    TableAutomation.prototype.AddPage = function() {
         var previousTextFrame = app.activeDocument.pages[-2].textFrames[0];
         var np = app.activeDocument.pages.add();
         var textFrame = np.textFrames[0];
         previousTextFrame.nextTextFrame = textFrame;
    };
    

    The cost of the above code was about 5 hours of banging my head against the wall

  • In Acrobat XI, how can I select and move multiple blocks of text/image at the same time on the same page?

    I work with PDF files generated by student requiring all content in a specific range of margin. Occasional tables and figures are indented or otherwise properly spaced so that the content violates the margin requirement. In Acrobat X, I could use the selection tool to draw a selection rectangle around all text and lines of a table for example and just drag the entire table over a little to meet the requirements without referring the PDF to the author for correction. It did not always work, but quite often that I was able to use it on a daily basis.

    Is it possible to select several (but not ALL) blocks of text and image on a page pieces, so they may be submitted at the same time? If I have to select each text block and lines (or each point and in a chart) and move them each individually, it's going to be a nightmare.

    I have Acrobat XI for Mac and Windows, but tend to use the version of Windows more often.

    People have reported what happens when preview of the output (I think) window is open. So you can close.  have not heard of another fix

  • A string of text based on the document

    I'm new to illustrator, how to, I put a text string in a document.

    The snippet Panel is simplistic, and I suspect his fall, new version of the text above the other, so you're probably looking to a bunch of text objects (you probably understood that well).

    To change the text of the existing text, you will need to handle the text to change. I do not recommend hanging from the handles outside a 'session' - there are things that cause handles to change, and the object could be deleted after all. Yet, assumg you have the handle, perhaps to the pulling of the selected art set. Then you should do something like this:

    void SetText (handle AIArtHandle, const ASUnicode * text, int length)
    {

    REF TextRangeRef = 0;

    sAITextFrame-> GetATETextRange(handle, &ref);)

    ATE::ITextRange range (ref);

    first delete it

    range. Remove();

    He prepares

    range. InsertAfter (text, length);

    }

  • Stretching a block of text to match the dimensions of the page

    Hi all

    I worked on a document for a long time. After you're done working on it, I changed my mind about the dimensions of the pages.
    Now, I want to reduce the height and width of all pages. However, if I change them, they become smaller than the text blocks, even if they were exactly the same size before.
    Any help on this would be really appreciated.

    Thank you.

    Edit > setting layout and it lights up.

    Then when you resize the pages - text blocks must be resized - given that they are based on the margins.

  • Under Type menu - Insert a special character - markers - current Page number in the text frame on the Master Page gives the letter A and also a horizontal black line the width of the text box.   This line is not a rule.  Turn on the Wellin gives another l

    Is anyone out there?

    I found the problem.  It was a rule after all.  I didn't the insertion point to the right place.  Everything is OK now.

  • Update table of contents (frame) in the primary anchor text stream?

    I understand that a table of contents of InDesign should sit on its own page or in a separate text frame, so it can be easily maintained and updated.

    Help of InDesign said: "avoid threading the TOC to other blocks of text frame in the document. If you replace the existing table of contents, the whole story will be replaced by the update table of contents. »

    Fine and understand. However, I'm working on a project where I need all the content (from the illustration of the cover of the last line) to sit in the primary sequences of the spread of master - including the table of contents.

    Here's what I've tried: I open the Table of contents dialog, made all the settings and click OK. Clicking on will now create a new text frame with the table of contents, which can be changed by selecting this image by using "Update Table of contents. So far so good.

    I cut this framework and then inserted as a framework anchored in the stream text main, just as I have anchor a table, image, etc.. However, after anchor this TOC frame, I can not more updated by using "update the Table of contents. It is just another framework, not recognized as the table of contents more.

    Is there another way to have a 'live', table being updated content that will float in the primary text flow?

    Thank you.

    Ariel, I think you should give up on e-mail responses - empty again...

    PlainMartin,

    I could make this work in CS6 (and I would consider another version that allows to drag the anchored object rather than cut and paste). Now the SHIFT key and dragging the blue handle in the main story, I could anchor the table of contents, and when the text cursor was in it I could update. Make sure you anchor in a separate paragraph that uses a style that is NOT included in the table of contents, or he'll start on update.

  • Try to get a collection of frames of texts related with the second table in my document

    Hi all

    There are two long tables in my document, and I want to do is to get the collection of blocks of text that contain the second table to resize (single height),

    and set the number of columns to 3 columns and column gutter to 0, but I am unable to get the collection of blocks of text that contains the second table.

    I also want to apply a different master page to the pages that contain the second table.

    I know that I can change my number of columns and the gutter using script below, but the thing is I don't want the script to assign my first table,

    and I can not also put the tables in separate the file because there are cross-references.

    Script to change the gutter and the number of columns

    app.findObjectPreferences.textColumnCount = 1;

    app.changeObjectPreferences.textColumnCount = 3;

    App.Documents.Item (0) .changeObject ();

    app.findObjectPreferences.textColumnGutter! = 0 ;

    app.changeObjectPreferences.textColumnGutter = 0;

    App.Documents.Item (0) .changeObject ();

    I'm new to javascript and I searched for solutions for several days, but still can not find how to get it work.

    Any input will be appreciated!

    V

    I think that's what you want.

    var doc, secondTable, secondTableTextCotainers = [], ps, firstFrame, lastFrame, nextFrame;
    doc = app.properties.activeDocument;
    if (!doc) {
        alert("Jerk");
        exit();
    };
    app.findTextPreferences = null;
    app.findTextPreferences.findWhat = "\x16";
    var tables = doc.findText(false);
    if (tables.length > 1) secondTable = tables[1];
    else exit();
    lastFrame = secondTable.parent.insertionPoints[secondTable.index + 1].parentTextFrames[0];
    firstFrame = secondTable.parentTextFrames[0];
    secondTableTextCotainers.push(firstFrame);
    if (lastFrame != firstFrame) {
        nextFrame = firstFrame;
        while (nextFrame = nextFrame.nextTextFrame) {
            secondTableTextCotainers.push(nextFrame);
            if (nextFrame == lastFrame) break;
        }
    }
    var l = secondTableTextCotainers.length;
    // You might want to change this line
    while (l--) secondTableTextCotainers[l].fillColor = "Yellow";
    

Maybe you are looking for

  • Links in the Facebook crash and Safari pages keep reloading / crashing even with iOS 9.3.2

    Ive got ios 9.3.2 and links in Facebook keep crashing again. And every time I try to navigate in safari or chrome pages keep reloading. Sometimes only couple of times, but other times it charging until the phone freezes and puts an end to all applica

  • read PhotoStory3 poster white when produced videos through Web site

    I did 3 WMV files as a slide show with MP3 files as background music using PhotoStory3.WMV files open and play when I open it in my computer, but when I downloaded on my web site, playback of MP3s, but the screen is black and white.When I do the same

  • How can I add infolinks to my Web site?

    I'm trying to integrate infolinks into my Web site. These are the directions, but it does not work. How can I add infolinks to my site? Go to the source code of your Web site Paste the code just before the closing at the end of the code tag.If you ar

  • How to close the mode 'sleep'

    How can I turn off keeps it mode sleep stops every five minutes

  • CameraRaw problem

    Everything by opening an image with cc 2015, camera raw opens onto a blue screen and the white cross.Someone at - it an idea to solve this problem?Kind regardsHenk