Adobe After Effects的扩展脚本 - 如何运行命令行脚本,并传递参数呢? [英] Adobe After Effects extend script - how to run script from command line and pass in arguments?

查看:1372
本文介绍了Adobe After Effects的扩展脚本 - 如何运行命令行脚本,并传递参数呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图运行在命令行中的Adobe AE extendscript。我用-r参数,我可以运行脚本罚款。但是,是否有可能传递参数给脚本?

I'm trying to run an Adobe AE extendscript from the command line. I use the "-r" argument and I can run scripts fine. However, is it possible to pass in an argument to the script?

像,如果我运行这个命令行:

Like, if i run this from the command line:

C:\>"C:\Program Files\\Adobe\\Adobe After Effects CC\\Support Files\\AfterFX" -r   "C:\Workspaces\MyAEScripts\AutomateSetup.jsx" hello

是有可能得到的你好到我AutomateSetup.jsx脚本?我一直在Google上搜寻了一​​段时间,并不能找到一个解决这个。

is it possible to get that "hello" into my AutomateSetup.jsx script? I've been googling for a while and can't find a solution to this.

推荐答案

我的解决方法是写的参数在当前工作目录或在脚本目录下的文件,然后读取它们的脚本。

My workaround is to write the arguments to a file in the current working directory or under the directory where the script is, and then read them in the script.

您可以用得到的Mac OS X的工作目录 system.callSystem('PWD')

You can get the working directory in Mac OS X using system.callSystem('pwd').

在Windows下,你可以使用 system.callSystem(CMD.EXE / C回声%CD%'')脚本的目录。

Under Windows, you can get the directory of the script using system.callSystem('cmd.exe /c "echo %cd%"'').

这篇关于Adobe After Effects的扩展脚本 - 如何运行命令行脚本,并传递参数呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆