Copy link to clipboard
Copied
I have inherited some documents from a client where all the text frames are not threaded. When I click the out-port of a frame and then hover over the area of the in-port frame that I want to thread it to, I see the cursor change to the thread icon, but when I click, it creates a blank text frame and threads to it.
All frames are on the same layer and unlocked. I am showing all frames but I am unable to target the in-port of the frame I want to link to. Is there a way to display the in/out ports without hovering over them? Is there something I am missing in doing what should be a simple task?
Thanks in advance for any help.
Copy link to clipboard
Copied
Hard to know what's going on without seeing the file or some screenshots etc.
Here's a script if it helps to thread them for you - but best to find out what's causing it not to work.
Be interested to see more of the file itself or your screenshots/layers panel etc.
// Check if at least two text frames are selected
if (app.selection.length < 2) {
alert("Please select at least two text frames.");
} else {
try {
// Store selected text frames
var selectedFrames = app.selection;
// Sort selected items based on geometricBounds (if needed for order)
selectedFrames.sort(function (a, b) {
return a.geometricBounds[1] - b.geometricBounds[1]; // Sort by x-coordinate
});
// Loop through and thread the text frames
for (var i = 0; i < selectedFrames.length - 1; i++) {
if (selectedFrames[i].constructor.name === "TextFrame" && selectedFrames[i + 1].constructor.name === "TextFrame") {
selectedFrames[i].nextTextFrame = selectedFrames[i + 1];
} else {
alert("Selected items must be text frames.");
break;
}
}
alert("Text frames have been threaded successfully!");
} catch (e) {
alert("An error occurred: " + e.message);
}
}
Copy link to clipboard
Copied