Currently I'm using this Python code to start Photoshop, a workfile and run a script on it:
Code: Select allimport subprocess
photoshop = r"X:\Adobe\Adobe Photoshop CC (64 Bit)\Photoshop.exe"
script = r"X:\Lolpath\test.jsx"
texture = r"X:\Lolpath\test.psd"
subprocess.Popen((photoshop, texture, script))
Problem is that I have a few variables in the javascript that I want to be altered on the Python side, and I'm not sure about how to do this.
On the python side I want something like (pseudo code):
Start photoshop, open workfile, run this script but overwrite these vars in the script:
var theBool = true;
var theInt = 5;
Basicly, the user will interact with a Python UI - and there decide the values of theBool and theInt.
Then when the javascript executes (via subprocess.Popen) or whatever, it should take those values into consideration.
The javascript contains both functions and executable code which runs said functions.