3 Replies Latest reply on Mar 10, 2014 5:01 AM by Peter Spier

    Trouble ending a thread in InDesign CS6?

    fijiboy67

      I am having trouble ending a thread in a long document with separate sections. Using InDesign CS6 on Mac running OSX 10.6.8.  I checked Online Help and it says to double click either the In or Out box. This doesn't work, just loads the Select tool with text. I tried holding down Command, Option, and shift alternately and in combination while doing it, didn't alter the result. Any advice please?

        • 1. Re: Trouble ending a thread in InDesign CS6?
          Peter Spier Most Valuable Participant (Moderator)

          What do you mean by ending a thread?

           

          You can break a thread by clciking hte outbox of the last frame you want to include inthe thread, then clicking inside the frame. Any text that was part of the thread beyond that point will become overset.

          • 2. Re: Trouble ending a thread in InDesign CS6?
            fijiboy67 Level 1

            No, sorry, clicking the outbox is exactly what I have been doing, but it just loads the select tool with text. If I then click in the same box it merely superimposes text on that page. What I want to do is break the thread, so that the next page stands quite separate from it. If I just stop linking and start afresh on a new page, it shows up as an error on the Pre-flight panel.

            • 3. Re: Trouble ending a thread in InDesign CS6?
              Peter Spier Most Valuable Participant (Moderator)

              fijiboy67 wrote:

               

              No, sorry, clicking the outbox is exactly what I have been doing, but it just loads the select tool with text.

              Yes.

               

              If I then click in the same box it merely superimposes text on that page.

              No. You must click INSIDE the same FRAME (don't try to double-click or click in the outport again). This will break the link to the following frames and leave your last frame overset if there was text in those following frames.

               

              If I just stop linking and start afresh on a new page, it shows up as an error on the Pre-flight panel.

              What error?

               

              If you want to break apart a story into several different stories you need to cut the overset text from the first story and paste it into a new frame (or the still linked-to-one-another frames that you unlinked from the story in the earlier step.

               

              You can use the DivideStory.jsx script to automate the process:

               

              //DESCRIPTION: Splits story at the selected text frame.
              
              // The selected frame becomes the first of the new story. 
              // Note that the behavior when an overset last frame is selected 
              // is different from that of the break-out text frame script. 
              // This script moves the overset text to the second story while 
              // breaking out the last frame leaves the overset text attached to the first story.
              
              if ((app.documents.length != 0) && (app.selection.length != 0)) {
                   var myFrame = app.selection[0];
                   if (myFrame.constructor.name != "TextFrame") {
                        errorExit('Please select a text frame');
                   }
                   var myStory = myFrame.parentStory;
                   var mySplit = myFrame.textFrameIndex;
                   var myTot = myStory.textFrames.length;
              
                   // Because of the possibility of tables, we must always work from the back
                   var myStart = myTot - 1;
                   var myEnd = mySplit;
              
                   // Nothing to do if user has selected first frame.
                   if (myEnd != 0) {
                        if (myStart > myEnd) {
                             var myPrevFrame = splitMe(myStory.textFrames[myStart]);
                             myStart--;
                             for (var i = myStart; i> myEnd; i--) {
                                  var myNewFrame = splitMe(myStory.textFrames[i]);
                                  myPrevFrame.previousTextFrame = myNewFrame;
                                  myPrevFrame = myNewFrame;
                             }
                        }
                        // Now we deal with the last frame
                        myFrame = myStory.textFrames[myEnd]
                        try {
                             myIndex = myFrame.characters[0].index;
                             stEnd = myStory.length - 1;
                             myText = myStory.texts[0].characters.itemByRange(myIndex,stEnd);
                        } catch (e) { } // Ignore; happens if last character is a table or frames are empty.
                        myNewFrame = myFrame.duplicate();
                        try{myText.remove();}catch(e){} //ignore empty frame
                        myFrame.remove();
                        try{myPrevFrame.previousTextFrame = myNewFrame;}catch(e){} //fails if one frame only
                        //Finally, if, and only if, the split is mid-table, myStory is now overset
                        if (myStory.textFrames[-1].overflows) {
                             myTable = myStory.characters[-1].tables[0];
                             myNewTable = myNewFrame.parentStory.characters[0].tables[0];
                             myRowCount = myNewTable.rows.length;
                             myTable.rows.itemByRange(0 - myRowCount,-1).remove();
                        }
                   }
              } else {
                   errorExit();
              }
              
              // +++++++ Functions Start Here +++++++++++++++++++++++
              
              function splitMe(myFrame) {
                   myDupeFrame = myFrame.duplicate();
                   while(myDupeFrame.contents.length > 0) {
                        myDupeFrame.texts[0].remove();
                   }
                   myFrame.remove();
                   return myDupeFrame;
              }
              
              function errorExit(message) {
                   if (arguments.length > 0) {
                        if (app.version != 3) { beep() } // CS2 includes beep() function.
                        alert(message);
                   }
                   exit(); // CS exits with a beep; CS2 exits silently.
              }
              // +++++++ Script Ends Here ++++++++++++++++++++++++++

              I believe this was written by Dave Saunders. I have it in a "Version 4.0 Scripts" subfolder in my Scripts Panel folder because it is very old and may not run correctly without being in such a subfolder. The subfolder name is case-sensitive, but should not include the quotes.