I wrote a simple applescript to replace names of layers in Illustrator. It works great and thanks to Applescript studio, it has a better interface than the Java script we were using until recently. The Java script was made to run from within Illustrator via File > Scripts > Other Scripts…
Is there a way to change properties of many layers in an applescript so it only comes in as one undo?
That depends on what the criteria for renaming the layers. Two potential options are:
tell application "Adobe Illustrator"
tell document 1
set x to name of layers 1 through 2
set name of layers 1 through 2 to "Test This" --renames the top two layers in the stacking order
set name of (every layer whose name contains "Layer") to "Test"--renames any layer with "Layer" in it's name to Test
I see, so the idea is to avoid a loop.
Unfortunately, I’m renaming the layers as “New Name 01” , “New Name 02” … I’m guessing you can only do that with a repeat-loop.
Thanks for the help, there’s few scripts I should be able to optimise with your pointers.