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

Script to select a Bridge Folder

Engaged ,
Aug 25, 2021 Aug 25, 2021

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
994
Translate
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()
Translate
LEGEND ,
Aug 26, 2021 Aug 26, 2021
var myFolder = 'path/to/folder';
if(Folder(myFolder).exists){
    var thumb = new Thumbnail(Folder(myFolder));
    app.documents[0].thumbnail = thumb;
    }
Translate
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

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

 

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

 

Translate
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

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

 

Translate
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

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
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
with(app.document)
	pth = thumbnail = decodeURI(File(presentationPath).path)
	+ '/Review', select(new Thumbnail(pth + '/T'))
Translate
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

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

Translate
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

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

 

 
 

 

 

 
Translate
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
'with(app.document) thumbnail = decodeURI(File(presentationPath).path) + "/" + ' + theFolder.toSource()
Translate
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
LATEST

Awosome! you are too good Kukurykus. Thank you!

Translate
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