Last active
April 28, 2018 14:09
-
-
Save mazgi/6026978 to your computer and use it in GitHub Desktop.
JSX(Adobeの方)でスクリプトファイル自身のpathを求める ref: https://qiita.com/mazgi/items/863e9083430084e82cba
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SELF = (function(){ | |
try {app.documents.test()} | |
catch(e) {return File(e.fileName)} | |
})(); | |
$.writeln(SELF instanceof File); | |
$.writeln(SELF); | |
$.writeln(SELF.path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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