Skip to main content
Inspiring
Aug 26, 2021 4:59 AM UTC
Answered

Script to select a Bridge Folder

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 is closed to new replies. Start a new post to keep the conversation going.
Kukurykus
KukurykusCorrect answer
Legend
Sep 28, 2021 5:50 PM UTC

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()

9 replies

Kukurykus
Legend
Aug 26, 2021 3:23 PM UTC

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

 

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

 

Translate
Inspiring
Sep 2, 2021 5:58 PM UTC

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

 

Translate
Inspiring
Sep 28, 2021 1:50 PM UTC

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()

}

 

Translate
Legend
Aug 26, 2021 12:45 PM UTC
var myFolder = 'path/to/folder';
if(Folder(myFolder).exists){
    var thumb = new Thumbnail(Folder(myFolder));
    app.documents[0].thumbnail = thumb;
    }
Translate