Unthread text frames

29 views
Skip to first unread message

Andrew Brown

unread,
Oct 12, 2015, 7:04:22 AM10/12/15
to indesi...@googlegroups.com
To break a text thread, Adobe help states :

Double-click an in port or out port to break the connection between frames.

Click an in port or an out port that represents a thread to another frame. For example, in a two-framed thread, click either the out port of the first frame or the in port of the second frame. Position the loaded text icon over the previous or next frame to display the unthread icon . Click in the frame you want to remove from the thread.

Usually, but not always, the first option creates a new text frame and threads it to the frame you are trying to separate from the following frames.

The second option never displays the unthread icon, and usually creates a new frame similar to that of the first option.

Is there any way of breaking a text thread that works reliably?

AB

William Adams

unread,
Oct 12, 2015, 8:53:41 AM10/12/15
to indesi...@googlegroups.com
On Oct 12, 2015, at 7:04 AM, Andrew Brown wrote:

> Is there any way of breaking a text thread that works reliably?

I just copy the frame which I don't want attached, delete it, then paste in place and delete the content.

William

--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

Harbs

unread,
Oct 12, 2015, 9:06:15 AM10/12/15
to indesi...@googlegroups.com
Try this script. Just select some text or the text frame and run…

BreakThread();
function BreakThread(){
if(!app.selection || !app.selection.length){
beep();
alert("Select some text.");
return;
}
var sel = app.selection[0];
if(IsText(sel)){
if(sel.parentTextFrames.length == 0){
beep();
alert("Your text appears to be overset.");
return;
}
sel.parentTextFrames.nextTextFrame = null;
} else {
if(sel instanceof TextFrame){
sel.nextTextFrame = null;
}
}
}
function IsText (obj) {
case "InsertionPoint":
case "Character":
case "Word":
case "TextStyleRange":
case "Line":
case "Paragraph":
case "TextColumn":
case "Text":
return true;
default :
return false;
}
}

Harbs

On Oct 12, 2015, at 2:04 PM, Andrew Brown <li...@c18.net> wrote:

To break a text thread, Adobe help states :

Double-click an in port or out port to break the connection between frames.

Click an in port or an out port that represents a thread to another frame. For example, in a two-framed thread, click either the out port of the first frame or the in port of the second frame. Position the loaded text icon over the previous or next frame to display the unthread icon <Cursor_UnlikFrames.png>. Click in the frame you want to remove from the thread.

Usually, but not always, the first option creates a new text frame and threads it to the frame you are trying to separate from the following frames.

The second option never displays the unthread icon, and usually creates a new frame similar to that of the first option.

Is there any way of breaking a text thread that works reliably?

AB

--
You received this message because you are subscribed to the Google Groups "InDesign talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to indesign-tal...@googlegroups.com.
To post to this group, send email to indesi...@googlegroups.com.
Visit this group at http://groups.google.com/group/indesign-talk.
For more options, visit https://groups.google.com/d/optout.

google

unread,
Oct 12, 2015, 10:32:01 AM10/12/15
to indesi...@googlegroups.com
There are also the scripts BreakFrame (has to be the first or last frame in a thread), DivideStoryin2 (selected frame begins a new thread), and StorySplitter (break connection between all frames in a thread). I’ve used all of them and they work well. Some of these may ship with ID but I don’t remember which. — Rebecca


BreakFrame

//BreakFrame.jsx
//An InDesign CS5 JavaScript
/*  
@@@BUILDINFO@@@ "BreakFrame.jsx" 3.0.0 15 December 2009
*/
//Removes the selected text frame (or text frames) from the
//story containing the text frame and removes the text contained
//by the text frame from the story.
//
//If you want to split *all* of the text fames in the story, use the
//SplitStory.jsx script.
//
//For more information on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
//Or visit the InDesign Scripting User to User forum at http://www.adobeforums.com.
//
main();
function main(){
//Make certain that user interaction (display of dialogs, etc.) is turned on.
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
var myObjectList = new Array;
//Script does nothing if no documents are open or if no objects are selected.
if(app.documents.length != 0){
if(app.selection.length != 0){
//Process the objects in the selection to create a list of
//qualifying objects (text frames).
for(myCounter = 0; myCounter < app.selection.length; myCounter ++){
switch(app.selection[myCounter].constructor.name){
case "TextFrame":
myObjectList.push(app.selection[myCounter]);
break;
default:
if(app.selection.length == 1){
//If text is selected, then get the parent text frame.
switch(app.selection[myCounter].constructor.name){
case "Text":
case "InsertionPoint":
case "Character":
case "Word":
case "Line":
case "TextStyleRange":
case "Paragraph":
case "TextColumn":
myObjectList.push(app.selection[myCounter].parentTextFrames[0]);
break;
}
}
break;
}
}
//If the object list is not empty, pass it on to the function
//that does the real work.
if(myObjectList.length != 0){
myBreakFrames(myObjectList);
}
}
}
}
function myBreakFrames(myObjectList){
myObjectList.sort(myReverseSortByTextFrameIndex);
for(var myCounter = 0; myCounter < myObjectList.length; myCounter ++){
myBreakFrame(myObjectList[myCounter]);
}
}
function myBreakFrame(myTextFrame){
if((myTextFrame.nextTextFrame != null)||(myTextFrame.previousTextFrame != null)){
var myNewFrame = myTextFrame.duplicate();
if(myTextFrame.contents != ""){
myTextFrame.texts.item(0).remove();
}
myTextFrame.remove();
}
}
function myReverseSortByTextFrameIndex(a,b){
//By combining the story id with the text frame index, we can sort the text frames
//into the right (reverse) order in a single pass.
$.write("padded a: " + myPadString(a.id, 8)+myPadString(a.textFrameIndex, 8));
$.write("padded b: " + myPadString(b.id, 8)+myPadString(b.textFrameIndex, 8));
if((myPadString(a.id, 8)+myPadString(a.textFrameIndex, 8)) > (myPadString(b.id, 8)+myPadString(b.textFrameIndex, 8))){
return -1;
}
if((myPadString(a.id,8)+myPadString(a.textFrameIndex,8)) < (myPadString(b.id,8)+myPadString(b.textFrameIndex,8))){
return 1;
}
return 0;
}
function myPadString(myString, myLength) {
  var myTempString = "";
  var myNewLength = myLength-String(myString).length;
  for (var myCounter = 0; myCounter<myNewLength; myCounter++) {
    myTempString += "0";
  }
  return myTempString + myString;
}




DivideStoryin2

var tf = app.selection[0];
var i = tf.characters[0].index;
var story = tf.parentStory;
tf.previousTextFrame.nextTextFrame = null;
story.characters.itemByRange(i,-1).move(LocationOptions.AFTER,tf.insertionPoints[0]);



StorySplitter

/*
------------------------------------------------------------------------------------------------------------------
StorySplitter
------------------------------------------------------------------------------------------------------------------
An InDesign CS/CS2/CS3 JavaScript by FourAces
© The Final Touch 2006
Version 3.0.0

Splits the selected Story to separate Text Frames, while maintaining their contents.
------------------------------------------------------------------------------------------------------------------
*/
var myScriptVer = "3.0";

if(app.documents.length != 0){
var mySelection = app.activeDocument.selection;
if(mySelection.length != 0){
myObjectType = mySelection[0].constructor.name;
if(myObjectType == "TextFrame"){
//The Interface Dialog
var myDialog = app.dialogs.add({name:"Story Splitter v"+ myScriptVer});
with(myDialog){
with(dialogColumns.add()){
with (dialogRows.add()){
with(borderPanels.add()){
var mySplitOptions = radiobuttonGroups.add();
with(mySplitOptions){
radiobuttonControls.add({staticLabel:"Split All Frames", checkedState:true});
radiobuttonControls.add({staticLabel:"Split Before Selected Frame"});
radiobuttonControls.add({staticLabel:"Split After Selected Frame"});
}
}
}
with (dialogRows.add()){
staticTexts.add({staticLabel:"© The Final Touch"});
}
}
}
var myResult = myDialog.show({name:"SplitOptions"});
if(myResult == true){
var myStory = mySelection[0].parentStory;
if(app.version.split(".")[0] >= 5){
var myTextFrames = myStory.textContainers;
}
else{
var myTextFrames = myStory.textFrames;
}
var myStoryFramesCount = myTextFrames.length;
if(myStoryFramesCount > 1){
for(f = 0; f < myStoryFramesCount; f++){
if (mySelection[0] == myStory.textFrames[f]){
var myTextFrame = f;
}
}
switch(mySplitOptions.selectedButton){
case 0:
mySplitAll();
break;
case 1:
mySplitBefore();
break;
case 2:
mySplitAfter();
break;
}
}
else{
alert("Are You Kidding Me?!\nThe Story you selected has only ONE text frame.");
}
}
}
else{
alert("Wrong Selection\nYou selected the wrong type of object. Please select a Text Frame.");
}
}
else{
alert("No Selection Made.\nPlease select a Story to split.");
}
}
else{
alert("No Active Document Found.\nPlease open an InDesign document and select a Story to split.");
}

//----------------------------------------------------------------------------
function mySplitAll(){
for(i = 0; i < myStoryFramesCount; i++){
myTextFrames[i].duplicate();
}
for(i = 0; i < myStoryFramesCount; i++){
if(app.version.split(".")[0] >= 5){
myTextFrames[i].remove();
}
else{
myTextFrames[0].remove();
}
}
}

function mySplitBefore(){
if(mySelection[0].previousTextFrame == null){
alert("Unable Break Thread.\nThe selected Text Frame is the FIRST text frame of the thread.");
}
else{
var myBfBreakFrame = mySelection[0].previousTextFrame;
var myAfBreakFrame = mySelection[0];
var myBreakStory = myBfBreakFrame.parentStory;
mySelection[0].previousTextFrame = null;
if(myBfBreakFrame.overflows == true){
var myOversetText = myBreakStory.texts.itemByRange(myBfBreakFrame.insertionPoints[-1],myBreakStory.insertionPoints[-1]);
myOversetText.select();
app.cut();
app.select(myAfBreakFrame.insertionPoints[0]);
app.paste();
}
}
}

function mySplitAfter(){
if(mySelection[0].nextTextFrame == null){
alert("Unable Break Thread.\nThe selected Text Frame is the LAST text frame of the thread.");
}
else{
var myBfBreakFrame = mySelection[0];
var myAfBreakFrame = mySelection[0].nextTextFrame;
var myBreakStory = myBfBreakFrame.parentStory;
mySelection[0] .nextTextFrame = null;
if(myBfBreakFrame.overflows == true){
var myOversetText = myBreakStory.texts.itemByRange(myBfBreakFrame.insertionPoints[-1],myBreakStory.insertionPoints[-1]);
myOversetText.select();
app.cut();
app.select(myAfBreakFrame.insertionPoints[0]);
app.paste();
}
}
}

Judy Hicks

unread,
Oct 14, 2015, 3:16:00 PM10/14/15
to indesi...@googlegroups.com
Hello, 
can you search on a paragraph style and replace the previous paragraph style with another? I have a cookbook with a line that says “x servings” and the previous line is the recipe title. I am in indesign cs6 but have cc2014 if that has better options.
Thank you!
judy


---
Judy Hicks
Plush Design
613 Balra Drive
El Cerrito CA 94530

510 524-0265 tel

www.plushdesign.net

Judy Hicks

unread,
Oct 14, 2015, 4:37:49 PM10/14/15
to indesi...@googlegroups.com
Oh. My. God.
Worth the $49 even if I wasn’t able to use the demo (up to 3 searches). Stylin!

---
Judy Hicks
Plush Design
613 Balra Drive
El Cerrito CA 94530

510 524-0265 tel

www.plushdesign.net

William Adams

unread,
Oct 14, 2015, 4:40:31 PM10/14/15
to indesi...@googlegroups.com
Yes.

 - Bring up the Find dialog
 - if need be, click on More Options
 - click on the Magnifying Glass T icon next to the Find Format pane
 - select the appropriate style to find in the Find Format Settings window
 - repeat for Change Format
 - click on Change all

William


William Adams

unread,
Oct 14, 2015, 4:43:15 PM10/14/15
to indesi...@googlegroups.com
Oh. Okay. Here's how to do what you actually asked for:

 - Use GREP to find the paragraph containing X servings
 - replace w/ a marker text, new paragraph, then the contents of the current paragraph
 
Then search for paragraph, marker text, new paragraph, replace w/ marker text, paragraph and apply the paragraph style.

Then clean up by deleting the marker text

William

Boris Kas

unread,
Oct 14, 2015, 4:50:48 PM10/14/15
to InDesign Talk - Google

--
You received this message because you are subscribed to the Google Groups "InDesign talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to indesign-tal...@googlegroups.com.
To post to this group, send email to indesi...@googlegroups.com.
Visit this group at http://groups.google.com/group/indesign-talk.
For more options, visit https://groups.google.com/d/optout.



--
Всего доброго, Борис

Judy Hicks

unread,
Oct 14, 2015, 5:02:38 PM10/14/15
to indesi...@googlegroups.com
Thanks William!


---
Judy Hicks
Plush Design
613 Balra Drive
El Cerrito CA 94530

510 524-0265 tel

www.plushdesign.net

Bret Perry

unread,
Oct 14, 2015, 5:57:39 PM10/14/15
to indesi...@googlegroups.com

Great! Thanks Boris!

 

Bret Perry
Application Specialist/Studio Client Manager


ph 626-463-9365
fax 626-449-2201
bpe...@russreid.com

The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. If you have received this email in error, please notify us immediately by calling the Help Desk at 855-486-5519.


Harbs

unread,
Oct 16, 2015, 5:46:59 AM10/16/15
to indesi...@googlegroups.com
FWIW, I believe this is one of the functions of Style Utilities: http://in-tools.com/products/plugins/style-utilities/

Harbs

Andrew Brown

unread,
Oct 16, 2015, 8:05:49 AM10/16/15
to indesi...@googlegroups.com
Perfect, Harbs, many thanks. — AB

katmcg

unread,
Oct 17, 2015, 1:10:41 PM10/17/15
to indesi...@googlegroups.com
Currently I’m using Olav’s break frame js in cs6. I’ve been using it for years. Will it work in ID cc 2015? 

Kat





katmcg

unread,
Oct 17, 2015, 1:13:57 PM10/17/15
to indesi...@googlegroups.com
It's OlavsBreakThread.jsx
Reply all
Reply to author
Forward
0 new messages