我想获取当前运行Extendscript的绝对文件夹路径.
即在nodejs __DIR__中的php(或)__dirname中.相当于Extendscript.
Ala*_*agu 35
它是我自己找到的 $.fileName
对于文件夹名称,它是 (new File($.fileName)).parent
本质上:
var myPath = (app.activeDocument.fullName.parent.fsName).toString().replace(/\\/g, '/');
var myScriptPath = (File(app.activeScript.fullName).parent.fsName).toString().replace(/\\/g, '/');
alert('Document path is: ' + myPath + ' , and script path is: ' + myScriptPath);Run Code Online (Sandbox Code Playgroud)
米姆,
| 归档时间: |
|
| 查看次数: |
12496 次 |
| 最近记录: |