Select all doc text having the same font size as selected text

Contributor ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

Hi,

it is possible using script to select all other curent document text frames having the same font size?

Image-2022-06-09-11-11-ps.jpg   scipt →    Image-2022-06-09-11-13-ps.jpg

TOPICS
Scripting

Views

63

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Contributor , Jun 09, 2022 Jun 09, 2022
Solved for me, I found a script script sourcehttps://illustrator.uservoice.com/forums/333657-illustrator-desktop-feature-requests/suggestions/31533550-select-same-font-size-style-typeface-sizeif ((app.activeDocument.selection.length == 1) && (app.activeDocument.selection[0].typename == "TextFrame")) { var selectedText = app.activeDocument.selection[0]; var textObjects = app.activeDocument.textFrames var numTextObj = textObjects.length; for ( j = 0 ; j < numTextObj; j++ ) { if(textObjects[j].tex...

Likes

Translate

Translate
Adobe Community Professional , Jun 09, 2022 Jun 09, 2022
there's a native solution (also in the same uservoice you posted) Select->Same->Font Size Menu

Likes

Translate

Translate
Contributor ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

Solved for me, I found a script 🙂

script source

https://illustrator.uservoice.com/forums/333657-illustrator-desktop-feature-requests/suggestions/315...

if ((app.activeDocument.selection.length == 1) && (app.activeDocument.selection[0].typename == "TextFrame")) {
var selectedText = app.activeDocument.selection[0];
var textObjects = app.activeDocument.textFrames
var numTextObj = textObjects.length;
for ( j = 0 ; j < numTextObj; j++ ) {
if(textObjects[j].textRange.length > 0 && textObjects[j].editable==true && !textObjects[j].locked && !textObjects[j].hidden ){
if ( selectedText.textRange.characterAttributes.size == textObjects[j].textRange.characterAttributes.size ){
selCValue = selectedText.textRange.characterAttributes.textFont.name ;
txtCValue = textObjects[j].textRange.characterAttributes.textFont.name ;
if (selCValue == txtCValue ) {
textObjects[j].selected = true;
}
}
}
}
} else {
alert ("You must only have a single text object selected");
}

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

Well done! 🙂

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 09, 2022 Jun 09, 2022

Copy link to clipboard

Copied

LATEST

there's a native solution (also in the same uservoice you posted)

 

Select->Same->Font Size Menu

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines