BridgeTalk not working in .jsxbin
Copy link to clipboard
Copied
Hello,
when runnung this in the jsx file it works just fine but in a jsxbin file nothing seems to happen.
Does anyone here know what would need to be changed for this to work in a .jsxbin file?
CreateBridgeTalkMessage({file: myFile.toSource(),});
function CreateBridgeTalkMessage() {
var bt = new BridgeTalk();
bt.target = "photoshop";
bt.body = "var myFile = File(\"" + myFile + "\");";
bt.body += "var myPublishFolder = Folder(\"" + doc.filePath.parent + '/Final_Deliverables/Publish/'+ "\");";
bt.body += "raster =" + raster.toString() + "\rraster();";
bt.onError = function(errObj) {
$.writeln("Error: " + errObj.body);
};
bt.send(100);
}
Regards,
Mike
Explore related tutorials & articles
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello @r-bin,
I should have been more clear, I have a .jsx file that exports a pdf "myFile" from Indesign and then BridgeTalk tells Photoshop to open the pdf, and save it back out as a rastered pdf to a location. This all works in the .jsx file but when I save as a .jsxbin file it only works until the BridgeTalk part. I don't get any error message except from Indesign when it checks to see if the rastered pdf exist or not. I only included the BridgeTalk portion that seems to break in the .jsxbin file.
Regards,
Mike
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello @Stephen Marsh,
Thanks for the post... I looked at the link https://www.davidebarranca.com/2013/09/bridgetalk-export-as-binary-failures/ for a solution, the workaround otption to "move the separate function out of the binary encoding and leave it readable" won't work for me as this is just a small part of a very long script that's more than 1,300 lines of code. I believe you either have to remove the line breaks or add the \ at the end of each line in the binary encoding.
The workaround otption to "stringify the function" looks promising but I haven't had any success getting it to work.
Regards,
Mike
Copy link to clipboard
Copied
Have you tried to figure out what gets into bt.body? It would be useful to print the contents to the console, or save it to a jsx file (and try to execute it in photoshop manually).

