1 Reply Latest reply on Apr 4, 2012 4:10 AM by Muppet Mark

    Convert Javascript to Applescript

    Mohanvalli

      Hi,

       

      I need to convert javascript to Apple script. Please help!!!

       

      try {

      app.activeDocument.layers.getByName( '.ARD' ).remove(); } catch (e) {};

       

      MOhan

        • 1. Re: Convert Javascript to Applescript
          Muppet Mark Level 5

          tell application "Adobe Illustrator"

                    tell the current document

                              try

                                        delete (the first layer whose name is ".ARD")

                              end try

                    end tell

          end tell

           

          It's always a help if you state the language choice in the question…

           

          Edit… a change of string filter

          tell a

          tell application "Adobe Illustrator"

                    tell the current document

                              try

                                        delete (the first layer whose name ends with ".ARD")

                              end try

                    end tell

          end tell