首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >自动运行extendscript

自动运行extendscript
EN

Stack Overflow用户
提问于 2016-01-05 15:53:15
回答 1查看 418关注 0票数 0

我有一个用于After effects的jsx文件,它通过OSX Automator自动运行。但是当它想要渲染电影时,我得到了错误。

这是我为Automator编写的脚本: on run {input,parameters}

代码语言:javascript
复制
tell application "Adobe After Effects CC 2015"
    DoScriptFile ":Users:youandi:Desktop:WeatherApp:script:weather.jsx"
end tell


return input

终点管路

这就是After effects给我的错误。

无法在第399行执行脚本。After effects错误:无法创建文件夹Adobe After Effects自动保存

我认为这就是它出错的地方:

函数addToRender(){

代码语言:javascript
复制
for(var i=1; i<= items; i++){
    curItem = proj.item(i);
    if(curItem instanceof CompItem){
        if (curItem.name == "WeatherStation"){      
            app.project.renderQueue.items.add(curItem);
            var oldName;
            var newPath = "~/Desktop/WeatherApp/MoviesRender/";
            oldName = "WeatherStation.mov";
            app.project.renderQueue.item(1).outputModule(1).file = new File(newPath+oldName);
            app.project.renderQueue.render();

        }
    }
}  

}

//我已经尝试过app.project.renderQueue.render(curItem)

EN

回答 1

Stack Overflow用户

发布于 2016-01-05 23:48:18

你的文件夹存在吗?创建文件时,Extendscript无法创建文件夹。您还需要创建文件夹。请参见下面的示例。

代码语言:javascript
复制
if(Folder('~/Desktop/testing').exists !== true){
    Folder('~/Desktop/testing').create();
    }
var f = new File ('~/Desktop/testing/file.txt');
f.open('w');
f.write('test');
f.close();
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34606646

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档