Copy link to clipboard
Copied
i have text frame.
i search for script that select text frame by name (name of the object in the layer window), or by color (color of the text fill)
Do you really have named text frames?
Or there are only automatically "named" textframes (showing the first part of contents)?
Does that works for you?
app.activeDocument.textFrames.getByName("test").selected = true;
Copy link to clipboard
Copied
Do you really have named text frames?
Or there are only automatically "named" textframes (showing the first part of contents)?
Does that works for you?
app.activeDocument.textFrames.getByName("test").selected = true;
Copy link to clipboard
Copied
yes!!
thanks!
Copy link to clipboard
Copied
AND BY Stroke COLOR (magenta)?
Copy link to clipboard
Copied
This can be more or less efficient if you can specify that for sure, we can rely on the very 1st character of the text to have the stroke on it. If that is the case, we do not have to worry about traversing characters of text in order to know this is the text frame you want.
if so, maybe this will work for you, it selects all ones with 25+ magenta:
#target illustrator
function test () {
var doc = app.activeDocument;
var thisFrame;
for (var i = 0; i < doc.textFrames.length; i++){
thisFrame = doc.textFrames[i];
if (thisFrame.characters[0].strokeColor.magenta > 25) {
thisFrame.selected = true;
}
}
};
test();
Copy link to clipboard
Copied
Hey thanks,
I meant a contour of just a simple square.
Another thing I'm looking for is someone who writes paid scripts.