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

Script to select a Bridge Folder

Engaged ,
Aug 25, 2021 Aug 25, 2021

Copy link to clipboard

Copied

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

TOPICS
Scripting

Views

343

Likes

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

correct answers 1 Correct answer

LEGEND , Sep 28, 2021 Sep 28, 2021
'with(app.document) thumbnail = decodeURI(File(presentationPath).path) + "/" + ' + theFolder.toSource()

Likes

Translate

Translate
Community Expert ,
Aug 26, 2021 Aug 26, 2021

Copy link to clipboard

Copied

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

Likes

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
LEGEND ,
Aug 26, 2021 Aug 26, 2021

Copy link to clipboard

Copied

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

 

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

 

Likes

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
Engaged ,
Sep 02, 2021 Sep 02, 2021

Copy link to clipboard

Copied

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

 

Likes

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
Engaged ,
Sep 28, 2021 Sep 28, 2021

Copy link to clipboard

Copied

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

}

 

Likes

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
LEGEND ,
Sep 28, 2021 Sep 28, 2021

Copy link to clipboard

Copied

with(app.document)
	pth = thumbnail = decodeURI(File(presentationPath).path)
	+ '/Review', select(new Thumbnail(pth + '/T'))

Likes

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
Community Expert ,
Sep 28, 2021 Sep 28, 2021

Copy link to clipboard

Copied

There are multiple ways to traverse folders with Extendscript, this is one good example.

Likes

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
Engaged ,
Sep 28, 2021 Sep 28, 2021

Copy link to clipboard

Copied

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

 

 
 

 

 

 

Likes

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
LEGEND ,
Sep 28, 2021 Sep 28, 2021

Copy link to clipboard

Copied

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

Likes

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
Engaged ,
Sep 28, 2021 Sep 28, 2021

Copy link to clipboard

Copied

LATEST

Awosome! you are too good Kukurykus. Thank you!

Likes

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