简体   繁体   English

使用 Python 执行 Illustrator 批处理操作

[英]Executing an Illustrator batch action using Python

Does anybody know how to execute an illustrator batch action using python??有人知道如何使用 python 执行插画批处理操作吗? In Python I have images moved into a folder after they are processed using PILLOW.在 Python 中,我将图像在使用 PILLOW 处理后移动到一个文件夹中。 Then there's an action in Illustrator called "Export" that I made that converts images into another proprietary file format for an Imposition system we use.然后在 Illustrator 中有一个名为“导出”的操作,我将图像转换为我们使用的拼版系统的另一种专有文件格式。 I want to be able to call a batch action to be performed using the "Export" action.我希望能够调用要使用“导出”操作执行的批处理操作。 I'm assuming Win32com is they way to do it I just don't know what write in python to use certain actions.我假设 Win32com 是他们这样做的方式我只是不知道在 python 中写了什么来使用某些操作。

adobe_document = adobe_app."????"()

I did try putting "Actions.Export" where I put the????.我确实尝试将“Actions.Export”放在我放?????的地方。

On Windows you can make Illustrator the default application to open all jsx files.在 Windows 上,您可以将 Illustrator 设置为打开所有 jsx 文件的默认应用程序。

And you can write a jsx script to run any Illustration action.你可以编写一个 jsx 脚本来运行任何 Illustration 动作。

After that all you need is to execute the jsx file from your Python script with os.system("your_script.jsx") .之后,您只需使用os.system("your_script.jsx")从您的 Python 脚本执行 jsx 文件。 It will run Illustrator which will start the script that will fire your action.它将运行 Illustrator,Illustrator 将启动将触发您的操作的脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM