How can I pass a variable defined in Illustrator to Photoshop?
Hello,
I am writing a script primarily in photoshop but would liketo do some of the inital work in illustrator. Ultimately this will be a script to save mockups for tshirts, looping through designs and color choices and saving as jpg.
I have the full script working the way I want in photoshop currently but in order to make it better I would like to assign a selected color variable in illustrator where I am working with the designs and then pass to photoshop but I am not sure how to call that variable.
Just learned about bridgeTalk but not sure how to do the onResult or onRecieve for what I want to do.
here is a small section of what I have so far:
var bt = new BridgeTalk();
var specifier = "illustrator";
bt.target = specifier;
bt.body = '\
var docRef = app.activeDocument;\
var ORGselectedcolors1 = "";\
\
//Identify Selected Colors\
\
for ( var j=0; j < docRef.layers.getByName("+Shirt_Color").groupItems.length; j++ ) {\
if(docRef.layers.getByName("+Shirt_Color").groupItems[j].hidden == false){\
ORGselectedcolors1 = ORGselectedcolors1 + j +";";\
};\
};\
alert("orgslectedcolors: " + ORGselectedcolors1);\
';
bt.send();
the alert shows me the colors I have selected as it is supposed to ORGselectedcolors1 = 0;4;5;6
how do I utilize this information for the remaining part of the script in photoshop?
#target photoshop
var selectedcolors = ORGselectedcolors1 (from illustrator bridge talk)
Will post the sample documents and code shortly if that will help
thank you
