• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script run from Bridge saveAs brings dialog, works fine from Photoshop

New Here ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

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".

 

TOPICS
Actions and scripting

Views

90

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Adobe