Skip to main content
Inspiring
August 26, 2021
Answered

Script to select a Bridge Folder

  • August 26, 2021
  • 2 replies
  • 1319 views

The workflow starts in the Bridge app with the Edits folder.

The thumbnails are selected and a Photoshop scripts saves them into the Review folder and calls the Bridge to the foreground.

 

How can I select the Review folder after the Bridge is called to the foreground?

Basically going from the folder path /Edits to the folder path /Review

 

Folder stack

Selects

Edits

Review

Finals

This topic has been closed for replies.
Correct answer Kukurykus

Thnk you this work well. I removed the reference tothe subfoder T.

Is it possible to make the string "Review" into a varaible?

The code below does not work but it illustrates the varaible use.

 

var targetFolder = "Review";

function callBridge(targetFolder) {
BridgeTalk.bringToFront('bridge');
(bt = new BridgeTalk()).target = 'bridge'
 
//select folder
var theFolder = targetFolder;
bt.body = 'with(app.document) pth = thumbnail = decodeURI(File(presentationPath).path) + theFolder +, select(new Thumbnail())',

bt.send()
}

 

 
 

 

 

 

'with(app.document) thumbnail = decodeURI(File(presentationPath).path) + "/" + ' + theFolder.toSource()

2 replies

Kukurykus
Legend
August 26, 2021

Unless you want to open it (Bridge Script Create New folder) just select it:

 

with(app.document) select(new Thumbnail(presentationPath + '/Review'))

 

Inspiring
September 2, 2021

Thank you both for your suggestions. I will test the recommendation over the weekend.

 

Inspiring
September 28, 2021

Hello, I am sorry for taking awhile to get back to test teh snipts.

 

Using a Photshopscript that has a function at the end to call Bridge to forground,

I am trying to modify the function to display the content of a specific directory in the Bridge content pane. 

 

Folder stack example

Selects

Edits

 Selelcted Bridge thumbnails (run photoshop script with function at the end to call Bridge to the forground)

-T (subfolder)

Review

Finals

 

At the moment  the function calls Bridge to the forground and slectes the subfolder T.

What I am trying to do is select the folder Review which is on the same lavesl as the Edits folder.

What needs to change on the function to travel one step up, select the folder Review and open it in the Bridge content pane? 

 

function callBridge() {
BridgeTalk.bringToFront('bridge');
(bt = new BridgeTalk()).target = 'bridge'
//bt.body = 'app.document.deselectAll()',
 
//select folder
bt.body = 'with(app.document) select(new Thumbnail(presentationPath + "/T"))',
 
bt.send()

}

 

Legend
August 26, 2021
var myFolder = 'path/to/folder';
if(Folder(myFolder).exists){
    var thumb = new Thumbnail(Folder(myFolder));
    app.documents[0].thumbnail = thumb;
    }