• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Knowing where the script file is

Advocate ,
Aug 01, 2013 Aug 01, 2013

Copy link to clipboard

Copied

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

TOPICS
Scripting

Views

552

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 10, 2013 Aug 10, 2013

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines