LoginSignup
9

More than 5 years have passed since last update.

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

Last updated at Posted at 2013-07-18

追記

こんなことしなくても $.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
  3. You can use dark theme
What you can do with signing up
9