Execute a photoshop script with in photoshop from an Illustrator script
In an illustrator script that gets executed in illustrator I have the following:
#include "../jsx/ps.jsx"
runPScript('test 5026');
The ps.jsx file contains:
#target illustrator
function runPScript(template) {
var bt = new BridgeTalk;
bt.target = "photoshop";
var script = 'alert("' + template + '")';
bt.body = script;
bt.send();
}
This properly sends Alert to photoshop and I get the alert. However my goal is to run a full script.
I have another file smartObjPrep.jsx:
#target photoshop
app.preferences.rulerUnits = Units.PIXELS;
var doc = activeDocument;
doc.activeLayer = doc.layers.getByName("Art");
var soLayer = doc.activeLayer;
if (soLayer.kind == LayerKind.SMARTOBJECT){
...
Here I would like to execute this from Illustrator how would I execute the file script?
It also doesn't have to be in illustrator cep. If I could just have photoshop just triggered to run it be fine. I don't need a result in AI
