After Effects (Mac) 从终端执行脚本
我试图弄清楚如何从命令行执行 After Effects 脚本。
官方文档说:
Example (for Windows):
afterfx -r c:\script_path\example_script.jsx
Mac 上没有任何内容。然而我正在尝试:
open -b com.adobe.AfterEffects --args -r /script_path/example_script.jsx
但什么也没有发生。虽然该程序已打开,但似乎从未调用该脚本。
有人已经弄清楚这一点了吗?
I'm trying to figure out how to execute an After Effects script from the command line.
Official documentation says:
Example (for Windows):
afterfx -r c:\script_path\example_script.jsx
And nothing for Mac. However I'm trying:
open -b com.adobe.AfterEffects --args -r /script_path/example_script.jsx
And nothing happens. The program get opened though, but it seems that the script is never called.
Anyone had figured out this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这实际上已记录在此处
您现在应该能够将 DoScriptFile(而不是 DoScript)与 Applescript 一起使用。类似于:
您还可以通过将此方法与 MentalFish 提到的方法混合来使用外部参数调用特定函数
制作一个 applescript [在本例中称为 ASfile.scpt]:
从 python 并假设您有一台 64 位机器,您可以调用:
This is actually documented here
You should now be able to use DoScriptFile (instead of DoScript) with Applescript. Something like:
you can also call a specific function using external parameters by mixing this method with the one mentioned by MentalFish
make an applescript [in this case called ASfile.scpt]:
from python and assuming you have a 64bit machine you can call:
显然,Mac 上的 AE 不支持命令行执行脚本: http:// www.aenhancers.com/viewtopic.php?f=8&t=1903
这有效,创建一个 AppleScript 告诉 AE 通过 DoScript 命令运行脚本:
...并通过命令行运行脚本因此(以 32 位模式运行它):
如果您想传递要启动的脚本的参数,您可以这样做:
运行脚本并传递到jsx 文件:
Apparently AE on Mac does not support command line execution of scripts: http://www.aenhancers.com/viewtopic.php?f=8&t=1903
This works, create an AppleScript that tells AE to run the script via the DoScript command:
... and run the script via the command line as such (to run it in 32-bit mode):
If you want to pass in the parameter of what script to launch you can do it like this:
Run the script and pass in the path to the jsx file:
你可以将它放在启动文件夹中(我使用的是windows,win中的文件夹是Adobe After Effects CS4/Support Files/Scripts/Startup)。该文件夹中的脚本在 AfterEffects 启动时执行。
可能有帮助吗?
you could place it in the startup folder (I use windows, the folder in win is Adobe After Effects CS4/Support Files/Scripts/Startup). Scripts in that folder are executed upon AfterEffects booting up.
Might be helpful?
我想在这里提出一些很好的答案,尽管可能已经过时了。
此代码:
对于 applescript 文件有效,而 POSIX 代码则无效。
然后在 Mojave 终端中运行它,如下所示:
这最适合我。
I would like to throw in here, some answers where great though possibly outdated.
This code:
For the applescript file works, the POSIX code does not.
Then running it in the terminal for Mojave works like this:
This works best for me.
我得到了它的工作:
似乎我所要做的就是摆脱“r”标志。
祝你好运!
I got it working with this:
seems all I had to do was get rid of the 'r' flag.
Good luck!