Skip to main content
Known Participant
January 2, 2023
Question

Operations on many opened files by script

  • January 2, 2023
  • 3 replies
  • 572 views

Happy New Year!

 

I have such question: I have many opened files in Illustrator. I would like to do "find all text objexts" and then "change the selected text to curves" in all of them.

 

Perhaps you could help ?

Thank you.

This topic has been closed for replies.

3 replies

BeffAuthor
Known Participant
January 3, 2023

Could anybody write such script for me ?

I will pay.

Sergey Osokin
Inspiring
January 8, 2023

pixxxelschubser showed a code example. I will only add a loop of open documents. It is important that these functions skip locked or hidden text objects, if there are any in your documents.

 

(function () {
  var docs = app.documents;
  for (var i = 0, len = docs.length; i < len; i++) {
    docs[i].activate();
    app.executeMenuCommand("deselectall");
    app.executeMenuCommand("selectall");
    app.executeMenuCommand("outline");
    // Erase // the line below if you want to outline stroked texts
    // app.executeMenuCommand("OffsetPath v22");
    app.executeMenuCommand("deselectall");
  }
})();

 

pixxxelschubser
Community Expert
Community Expert
January 2, 2023

Unfortunately, your information is far too general and lacks the necessary information.

 

The scripted way: Use the following commands and loop through all open documents and add the save routine with your save (as) options.

Note: "Save as" allows you to keep your original files.

 

 

app.executeMenuCommand("selectall");
app.executeMenuCommand("OffsetPath v22");  
app.executeMenuCommand("outline");

 

 

BeffAuthor
Known Participant
January 2, 2023

OK, illustration is always the best.

I just want to change all texts to curves in all these files.

I don't want to save them as I plan to process with them further.

 

 

pixxxelschubser
Community Expert
Community Expert
January 2, 2023

Are you aware that you lose the editability of your texts if you reduce the originals in this way?

 

And for once I didn't mean a screenshot. Converting texts into outlines really only allows one interpretation.

I meant more the reference to your save options. Or are the open files really just to be overwritten?

Monika Gause
Community Expert
Community Expert
January 2, 2023

Select > Object > Text object

and then Type > Create outlines

could be recorded as an action and then you can make a batch (not on all opened files - but on certain folders ). Does that work for you?