0 Replies Latest reply on Dec 31, 2013 12:34 PM by abrenoch

    Using 'get selected' to retrieve selected swatches in applescript


      Please can somebody help me with this? It seems like it should be VERY straight forward, but this is making me want to bash my head in.. It just won't work for me.


      I've tried:


      set sg to get selected

      set sg to get selected swatches

      set sg to get selected swatches of current document

      set sg to swatches get selected


      and just about every variance of this imaginable.


      set sg to get selected of swatches


      Seems to want to work, but I get the following error:


      error "Adobe Illustrator got an error: Can’t get every swatch." number -1728 from every swatch



      I don't understand what is going on here.. I've looked online and can't find an example of it's usage ANYWHERE.

      Could someone PLEASE help me? I'm really getting angry with this.


      EDIT: The CS4 scripting guide lists this as a usage example:


      AppleScript — get selected swatches of document 1


      This DOES NOT WORK! The applescript won't even complie!