Adobe illustrator is convenient because you can automate various tasks with scripts! You can have the folder monitored and work automatically when data comes in, (Detailed in Illustrator CS Automation Strategy) Then, the illustrator will freeze and will not accept any operations from the outside. Let's monitor the folder with python, and if data comes in It would be convenient if I could execute the script prepared in advance ...
Windows7(64bit) python2.7 Adobe illustrator CS6
It seems that you can execute an external program by using subprocess. It's not just about hitting commands! Convenient!
hello.jsx
alert("hello! from python...")
execute_jsx.py
# -*- coding: utf-8 -*-
import subprocess
import os
currentdir = os.getcwd()
illustrator = "C:\Program Files\Adobe\Adobe Illustrator CS6 (64 Bit)\Support Files\Contents\Windows\Illustrator.exe"
hello = "\\".join([currentdir, "hello.jsx"]) #Specify absolute path
#Run JSX
subprocess.call([illustrator, hello])
If you change the path of illustrator to Photoshop, the script of Photoshop will work. But the essential inDesign doesn't seem to work. This is what I want to process from the outside, but hmm ...
Besides, it seems that you can use win32com to start a simple application. For passing variables, I once output the variables to an appropriate file, but I think there is probably a smarter way.
Recommended Posts