Copy link to clipboard
Copied
In the main Bridge interface there are filtering options to filter by rating (1 or more stars, 2 or more stars, etc) and Show Labeled Items Only, Show Unlabeled Items Only, etc. The ratings have key commands. Is there a way to assign a key command to Show Labeled Items Only? Or a way to script a call to that filter via AppleScript or ExtendScript?
I have a script that opens a folder of images into Bridge but I would like to take that one step further and filter by Show Labeled Items Only. Any ideas?
set bscString to {text returned} of (display dialog "Enter BSC" default answer "") as text
set characterCount to length of bscString
set alpha to text 1 of bscString
set brandCode to text 1 thru 5 of bscString
set brandStyleCode to text 1 thru 10 of bscString
set brandStyleColorCode to text 1 thru 15 of bscString
set folderPath to "/Volumes/extensis/product/" & alpha & "/" & brandCode & "/" & brandStyleCode & "/" & brandStyleColorCode & "/" as text
set openFolder to "app.browseTo( '" & folderPath & "');"
tell application "Adobe Bridge CC 2017"
activate
do javascript openFolder
end tell
Ah I missed that one, the code is a one line...
app.document.chooseMenuItem("ShowLabeled");
Again you need to know if Bridge is just been opened or if you have changed folders.
Bridge only uses javaScript, so AppleScript is no good.
Copy link to clipboard
Copied
Just create a smart collection...
Copy link to clipboard
Copied
Hmm, that is pretty great. I created one with a criteria of "If Label Exists". It works, but is not automatically selected. Know if there is a way to default to selecting that collection? Even being smart it requires me to click on it.
Copy link to clipboard
Copied
It could get very messy testing that you have changed folders, the easiest way it just click on the smart collection.
Copy link to clipboard
Copied
Thanks for the help SuperMerlin. This is a good step forward, but I'll continue looking for an automated way to either select that collection or make a call to Show Labeled Items Only. Our daily production of images is in the thousands and constantly changing folders so every saved click adds up over the year.
Copy link to clipboard
Copied
You would need to look at "Events" in the "Bridge CC JavaScript Reference.pdf"
Maybe using Document "loaded" and "selectionsChanged" events and checking the app.document.presentationPath you might be able to check if the folder has changed, then you could call the smart collection I.E. app.document.thumbnail = app.getCollections()[0];
Copy link to clipboard
Copied
Is there a "Bridge CC JavaScript Reference.pdf"? I've only been able to find the CS6 SDK with Bridge JS Reference guides. Though, within there it has a Filter By Ratings command section with Show Labeled Items Only command having a MenuID: "ShowLabeled".
I've been working with AppleScript and don't know ExtendScript at all really. Any help with calling that menuID?
Copy link to clipboard
Copied
Ah I missed that one, the code is a one line...
app.document.chooseMenuItem("ShowLabeled");
Again you need to know if Bridge is just been opened or if you have changed folders.
Bridge only uses javaScript, so AppleScript is no good.
Copy link to clipboard
Copied
Brilliant! Thanks a lot SuperMerlin​! Taking that one line of code I was able to insert it into my AppleScript and have it run at the end:
set showLabeledFilter to "app.document.chooseMenuItem('ShowLabeled');"
tell application "Adobe Bridge CC 2017"
activate
do javascript showLabeledFilter
end tell
Copy link to clipboard
Copied
How to show specific keywords through javascript in Adobe Bridge?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now