Skip to main content
4everJang
Legend
August 1, 2013
Question

Knowing where the script file is

  • August 1, 2013
  • 1 reply
  • 623 views

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

This topic has been closed for replies.

1 reply

4everJang
4everJangAuthor
Legend
August 10, 2013

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