Hello,
Everyone here have been a fantasic help getting me up and running with palette windows and understanding the basics of BridgeTalk and what it needs to work. I now understand about serializing the message, and loading and running external scripts via opening, reading, and sending them within the context of BridgeTalk. Now for this....
Background:
I have a palette window which contains a listbox of items that searches and lists the contents of over 400 products (Thanks Mr. Kahrel and scriptui 2.0!). See Attached. This pic of the template below is typical for all items. The imprint area shown will change depending on the product.
Script #1:
When the user selects a product from the list, that selection is used to open a file (illustrator template) for that item that shows a guide path box with height and width information for the imprint area on the product. The currently opened illustrator document contains the artwork they are working on at the time. This artwork is copied and pasted to the newly opened template file.
Script #2:
This script contains an array of all the products in the palette list. Within each index of that array, each item will contain the following information:
Example (the name property of each item will match the name of the index box selection from script #1):
var itemArray = new Array();
//p may be saved at index 0 of itemArray
var p = new Object();
p.name ="P- Shape P";
p.width = 189;
p.height = 103.5;
p.pos = [300,564];
I need to send the selection from script #1 to script #2 so I can loop through the array and find a match, at which point the information stored in the properties of the item will be used to scale the art and place it in the correct position on the template. Is there any way to send a variable from script #1 containing the name of the selection via BridgeTalk and have it stored in a variable in script #2? If not, I read somewhere where it might be possible to write/save it to disk and have the second script read it. As always, any help is invaluable.
Klemango