call bridge from other app
Hi all,
I developpe a script who need to call the terminal to execute a command line.
For that, is think i will call bridge from indesign and use the command app.system(shell_str);.
But i don't know how to get a bridge app from an indesign script?
sample:
#target indesign
var doc = app.activeDocument;
var array_all_links = doc.links;
for(var i = 0; i<array_all_links.length; i++){
is_transparency (array_all_links);
}
function is_transparency(link_item) {
var shellString = "mdfind -onlyin ";
shellString += "'" + link_item.filePath + "/'";
shellString += " 'kMDItemHasAlphaChannel == 1 ";
shellString += " && (kMDItemFSName == *.tif || kMDItemFSName == *.psd || kMDItemFSName == *.png)' > ";
shellString += "~/Desktop/StdOut.txt";
//call bridge
var targetApp = BridgeTalk.getSpecifier( "bridge", "1");
var sh = targetApp.system( shellString );
// error
return( sh );
};