Skip to content

Instantly share code, notes, and snippets.

@mazgi
Last active April 28, 2018 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mazgi/6026978 to your computer and use it in GitHub Desktop.
Save mazgi/6026978 to your computer and use it in GitHub Desktop.
JSX(Adobeの方)でスクリプトファイル自身のpathを求める ref: https://qiita.com/mazgi/items/863e9083430084e82cba
const SELF = (function(){
try {app.documents.test()}
catch(e) {return File(e.fileName)}
})();
$.writeln(SELF instanceof File);
$.writeln(SELF);
$.writeln(SELF.path);
const SELF = (function(){
try {app.documents.test()}
catch(e) {return File(e.fileName)}
})();
$.writeln(SELF instanceof File);
$.writeln(SELF);
$.writeln(SELF.path);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment