I made this script to save files in various options and folders.
It works fine when i run it from opened file in photoshop.
If i run it as batch from bridge, when it gets to the saveAs function, i get the saveAs dialog in photoshop, to chose the where to save.
Here is what i have now:
var doc = app.activeDocument;
saveTiffOriginal();
function saveTiffOriginal() {
var folder_name = Folder(doc.path + "/Tiff - original");
//Check if it exist, if not create it.
if (!folder_name.exists) folder_name.create();
var file = new File(folder_name + "/" + doc.name);
var opts = new TiffSaveOptions();
opts.imageCompression = TIFFEncoding.TIFFLZW;
doc.saveAs(file, opts, false);
}
It seems that when the file is opened from bridge, it relates to the doc differently, although when i do:
alert(BridgeTalk.appName), i get "photoshop" and not "bridge".