Reply To: Is there a script to combine selected frames as Threaded Text

Home Page / Forums / General InDesign Topics (CLOSED) / Is there a script to combine selected frames as Threaded Text / Reply To: Is there a script to combine selected frames as Threaded Text

#52203

Here is a script, specially written for you! It links any two text frames (obviously, only if they are not already linked) in top-down left-right order.

Make sure each frame ends with a hard return, or preferably even a Break Frame character!

if (app.selection.length == 2)
{
a = app.selection[0];
b = app.selection[1];
if (a instanceof TextFrame && b instanceof TextFrame)
{
if (a.geometricBounds[0] > b.geometricBounds[0])
{
a = app.selection[1];
b = app.selection[0];
} else
if (a.geometricBounds[0] == b.geometricBounds[0] && a.geometricBounds[1] > b.geometricBounds[1])
{
a = app.selection[1];
b = app.selection[0];
}
if (a.nextTextFrame == null && b.previousTextFrame == null)
a.nextTextFrame = b;
else
alert (“Oops …”);
} else
alert (“Oops …”);
} else
alert (“Please select two text frames”);

This article was last modified on March 21, 2010

Comments (0)

Loading comments...