var bt = new BridgeTalk();
bt.target = BridgeTalk.appSpecifier;
bt.body = 'targetFunction();';
bt.onResult = function(resObj){
doc = app.activeDocument;
grp = doc.groupItems;
for(var i=0; i<grp.length; i++){
// loop for groupitems
}
palette.layout.layout(true);
palette.show();
};
bt.send();
I am creating a script for redrawing a palette in Script UI.
However, when I try to access the activeDocument within the BridgeTalk.onResult callback, it doesn't work. It seems like the rest of the script is functioning properly. How can I make this work?