OMG! This feature is so amazing! Seriously going to save me so much time! I am having to update multiple maps and selecting similar text boxes in the map to change them to our new brand standards. This will seriously save me like 50+ hours of time! Thank you for pointing this out!
I wrote this script with GPT. Save it as a .jsx doc and it does the trick: // Illustrator Script: Select Text Frames with Matching Text function main() { var doc = app.activeDocument; if (!doc) { alert("No active document found."); return; } var sel = doc.selection; var searchText = ""; if (sel.length > 0) { // Check if any selected item is a text frame var textFrameFound = false; for (var i = 0; i < sel.length; i++) { if (sel[i].typename === "TextFrame") { searchText = sel[i].contents; textFrameFound = true; break; } } if (!textFrameFound) { // No text frame selected, prompt the user searchText = prompt("No text box selected.
Enter the text to search for:", ""); if (!searchText) { alert("No text entered. Script will exit."); return; } } } else { // No selection, prompt the user searchText = prompt("No text box selected.
Enter the text to search for:", ""); if (!searchText) { alert("No text entered. Script will exit."); return; } } var matchingTextFrames = []; var textFrames = doc.textFrames; for (var i = 0; i < textFrames.length; i++) { var tf = textFrames[i]; if (tf.contents === searchText) { matchingTextFrames.push(tf); } } if (matchingTextFrames.length > 0) { doc.selection = matchingTextFrames; alert(matchingTextFrames.length + " text box(es) found and selected."); } else { alert("No text boxes found with the text: " + searchText); } } main();
OMG! This feature is so amazing! Seriously going to save me so much time! I am having to update multiple maps and selecting similar text boxes in the map to change them to our new brand standards. This will seriously save me like 50+ hours of time! Thank you for pointing this out!
Excellent, glad it helped. It’s a good one.
Is there a way to select a specific word and all its occurrences in an Illustrator document?
Not that I know of, you can use find and replace and match case etc. But if it’s to change the format I don’t think so?
I wrote this script with GPT. Save it as a .jsx doc and it does the trick:
// Illustrator Script: Select Text Frames with Matching Text
function main() {
var doc = app.activeDocument;
if (!doc) {
alert("No active document found.");
return;
}
var sel = doc.selection;
var searchText = "";
if (sel.length > 0) {
// Check if any selected item is a text frame
var textFrameFound = false;
for (var i = 0; i < sel.length; i++) {
if (sel[i].typename === "TextFrame") {
searchText = sel[i].contents;
textFrameFound = true;
break;
}
}
if (!textFrameFound) {
// No text frame selected, prompt the user
searchText = prompt("No text box selected.
Enter the text to search for:", "");
if (!searchText) {
alert("No text entered. Script will exit.");
return;
}
}
} else {
// No selection, prompt the user
searchText = prompt("No text box selected.
Enter the text to search for:", "");
if (!searchText) {
alert("No text entered. Script will exit.");
return;
}
}
var matchingTextFrames = [];
var textFrames = doc.textFrames;
for (var i = 0; i < textFrames.length; i++) {
var tf = textFrames[i];
if (tf.contents === searchText) {
matchingTextFrames.push(tf);
}
}
if (matchingTextFrames.length > 0) {
doc.selection = matchingTextFrames;
alert(matchingTextFrames.length + " text box(es) found and selected.");
} else {
alert("No text boxes found with the text: " + searchText);
}
}
main();