【发布时间】:2017-10-04 11:20:27
【问题描述】:
我正在开发一个基于 NodeJS 的应用程序,它将自动化 Adobe Illustrator。 目标是使用 Node 执行一组 Illustrator 脚本。 这是可能的吗?
【问题讨论】:
标签: javascript node.js scripting automation adobe-illustrator
我正在开发一个基于 NodeJS 的应用程序,它将自动化 Adobe Illustrator。 目标是使用 Node 执行一组 Illustrator 脚本。 这是可能的吗?
【问题讨论】:
标签: javascript node.js scripting automation adobe-illustrator
您可以使用构建在 exec 库中的 Node.js 执行任意命令。文档位于:https://nodejs.org/api/child_process.html
【讨论】:
我想,为了自动化 Illustrator 的工作,您必须在 JS、Applescript 或 VB 脚本中使用 Illustrator 脚本。但是如果你正在为 Illustrator 的 CC 应用程序制作插件,那么你也可以使用 node js、npm 模块。这取决于您要使用的方式和位置。希望对你有帮助。
【讨论】:
这是可能的,但不是标准的“节点”意义上的。 例如。创建文件 => 运行文件。 要执行节点文件,您需要编写一些代码:
const myFunc = (options) => {
console.log(options)
}
在节点中你可以运行它,它会工作。 使用 Adobe Illustrator 脚本,它更像这样:
Create file => evalScript => illustrator runs evaluated script and executes code in illustrator.
从这里和许多其他地方给出的答案中,人们会认为您可以在 Illustrator 中运行任何节点包,并且 Illustrator 可以正常工作。实际上,正在运行的 JS 版本 Illustrator 不是最新版本,因此在 Illustrator CEP 中您无法执行几项操作。
你可以做很多事情,只需要找到解决办法。 更多信息在这里: https://github.com/Adobe-CEP
此处的 CEP 扩展示例: https://github.com/ten-A/CEP_Extension_Samples/tree/master/minimalSample
【讨论】: