Bridge labels (not refreshing)

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

kpt

Bridge labels (not refreshing)

Post by kpt »

I'm banging my head against the wall here, perhaps there is a simple solution?

The script below changes the label of a photo to "Approved" (green). After execution, nothing seems to have happened in Bridge. If I click on the photo, the preview window has a green label, but the thumbnail doesn't. It's only when I do View > Refresh in Bridge that the thumbnail's label becomes green.

Code: Select all#target "bridge";
var f = new File('~/testfile.jpg');
if (!f.exists)   
  alert('Does not exist: ' + f);
var tn = new Thumbnail(f);
app.synchronousMode = true;
tn.core.quickMetadata.label = 'Approved';
app.synchronousMode = false;
tn.refresh();


Is there a way to invoke the View > Refresh command by scripting?

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Paul MR

Bridge labels (not refreshing)

Post by Paul MR »

Please try this...

Code: Select all#target "bridge";
var f = new File('~/testfile.jpg');
if (!f.exists)  {
    alert('Does not exist: ' + f);
}else{
var tn = new Thumbnail(f);
tn.label = 'Approved';
}

kpt

Bridge labels (not refreshing)

Post by kpt »

<THUMP!>

(That's the sound of my head hitting the desk!)

Thanks Paul, don't know how I missed that