显然,Mac 上的 AE 不支持脚本的命令行执行:http ://www.aenhancers.com/viewtopic.php?f=8&t=1903
这可行,创建一个 AppleScript,告诉 AE 通过 DoScript 命令运行脚本:
set test to (POSIX file ("/Users/username/Desktop/test.jsx"))
tell application "Adobe After Effects CSYourVersionNumber"
DoScript test
end tell
...并通过命令行运行脚本(以 32 位模式运行):
arch -i386 osascript test.applescript
如果要传入要启动的脚本的参数,可以这样做:
on run argv
set test to (POSIX file (item 1 of argv))
tell application "Adobe After Effects CSYourVersionNumber"
DoScript test
end tell
end run
运行脚本并传入 jsx 文件的路径:
arch -i386 osascript test.applescript /Users/username/Desktop/test.jsx