Copy link to clipboard
Copied
Hello -
I try to make a small script to
Select a item by its name and after that
to change its size to a specific size (in points).
the name odf the items is "WeightSansProNormal" (as you can see in the attached screenshot)
But can't make it work 😞
Any help would be appreciate.
Thank you, enjoy your day.
#target illustrator
app.activeDocument.selection = null; // Ensure there is nothing in the document selected already. This way you only get the selection you want.
var thisDoc = app.activeDocument;
var myText = thisDoc.pageItems.getByName('WeightSansProNormal');
myText.textRange.characterAttributes.size = 16.6;
- Dimitri
Your code works for me as well without problems.
Do you get an error message? Or what is the problem?
the script should work, unless you have extra spaces in the Text Frame's name
Hello -
I dunno why,
but I turn off/on my computer and it works now …
Thank sfor your feedbacks.
Enjoy your day.
- Dimitri
Copy link to clipboard
Copied
Your code works for me as well without problems.
Do you get an error message? Or what is the problem?
Copy link to clipboard
Copied
the script should work, unless you have extra spaces in the Text Frame's name
Copy link to clipboard
Copied
Hello -
I dunno why,
but I turn off/on my computer and it works now …
Thank sfor your feedbacks.
Enjoy your day.
- Dimitri