6 Replies Latest reply on Sep 4, 2013 3:20 PM by michael_mandahl

    Scripts: Select an object with a note, duplicating and applying swatch

    big_smile Level 1

      I am trying to write a Javascript that can do the following:


      1) Select an object whose note has <Object Name> (so its layers is also selected)

      2) Duplicate the layer of that object

      3) Rename the new layer to <Layer Name>

      4) Apply a swatch to the object on the new layer (the object is only single colour)

      5) Apply a new note to the object (over-writing the original note).


      I also want to write a separate script that can do the following:

      1) Select an Object whose note has <Object Name> (so its layer is selected as well)

      2) Hide all other layers

      3) Save a copy of the document with a specific name


      I can do this as an Illustrator action. However, I need several different copies of the scripts where the Object Name, Layer Name, Swatch and File Name changes.

      Re-recording the action to change the names is cumbersome.


      I have looked at the Illustrator scripting reference, but cannot see any commands for select objects by their notes.


      I was wondering if someone could give me some pointers on how to proceed (Or possibly, if feeling very generous, could write the script for me )