LoginSignup
9

More than 5 years have passed since last update.

posted at

updated at

Organization

JSX(Adobeの方)でスクリプトファイル自身のpathを求める

追記

こんなことしなくても $.fileName で取れますね…


ちょっと気持ちわるいけどこれでスクリプトファイルのpathが取れるらしい。

path.jsx
const SELF = (function(){
    try {app.documents.test()}
    catch(e) {return File(e.fileName)}
})();
$.writeln(SELF instanceof File);
$.writeln(SELF);
$.writeln(SELF.path);

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
9