1 Reply Latest reply on Aug 10, 2013 2:39 AM by 4everJang

    Knowing where the script file is

    4everJang Level 3

      Hi all,

       

      Possibly this question has been asked and answered before. Forgive me if it has and point me to the right topic in that case. I am trying to figure out where the script is located that is being executed when it is called via the File > Script > Run command. Does the script have a handle to the directory where it is stored ?

       

      Thanks

       

      Jang

        • 1. Re: Knowing where the script file is
          4everJang Level 3

          Hi all,

           

          I got a reply from Rick Quatro off-list. Good to share it here, in case someone else is looking for the same thing. The answer is simple: the $ object contains all the information needed about the script that is being executed. I associated the $ object with the application, but it is the script that this is about. So the current location of the script that is being executed is available via $.filename. All $ object properties are listed on page 217 of the JavaScript Tools Guide (version Adobe Creative Suite 5).

           

          Ciao

           

          Jang