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

Custom Browse Scheme

New Here ,
Jul 05, 2005 Jul 05, 2005
Ok, as per the Adobe Bridge Javascript reference, I'm trying to add a custom browse scheme as follows:<br /><br />app.registerBrowseScheme("mim");<br />var root = new Thumbnail("mim://root", "My MIM");<br />root.displayPath="http://www.pbase.com/"; // just testing<br />root.displayMode="web";<br /><br />app.favorites.insert(root);<br /><br />This inserts the 'My MIM' entry in Favorites - however, there are 2 thumbnails not 1 as expected. Subsequent invocations add another thumbnail each time, so I modified the code as below to check whether it had already been inserted:<br /><br />var hasMIM = false;<br />for (var i=0; i<app.favorites.length; i++)<br />{<br /> if (app.favorites.name == "My MIM")<br /> {<br /> hasMIM = true;<br /> }<br />}<br /> <br />if (!hasMIM)<br />{<br /> app.favorites.insert(root);<br />}<br /><br />This however does not seem to work. Does anybody know how this is supposed to work or is this a bug?<br /><br />On a related note, does anyone know how to specify a custom icon for the thumbnail in Favorites?
TOPICS
Scripting
690
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
Community Beginner ,
Jul 05, 2005 Jul 05, 2005
There was an earlier post on the subject of adding icons with favorites using scripting:

Robert Stucky, "Adding an item to Favorites with an Icon" #, 27 May 2005 1:58 pm

Bridge remembers favorites between launches, so you should store your favorites added state in preferences.

if ( !app.preferences.myMimFavoritesAdded ) {
app.favorites.insert( root );
app.preferences.myMimFavoritesAdded = true;
}
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
New Here ,
Jul 05, 2005 Jul 05, 2005
Robert,

Thanks very much for the response, and the pointers. The problem of multiple Favorites entries for a single insert still remains, though. I tried it with the sample script from the reference too, and it does the same thing. The first time the insert is done, there are 2 entries in Favorites rather than just one.

When I click the second duplicate entry, the focus quickly goes back to the first one but they both do show up in Favorites.

...
My Mim
My Mim
...

Is this happening only on my machine? Is there some way to fix it?
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
Community Beginner ,
Jul 05, 2005 Jul 05, 2005
Huh. That doesn't happen with my machine.

What's the platform/OS?

Bob
Adobe Workflow Scripting
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
New Here ,
Jul 05, 2005 Jul 05, 2005
Actually, I just found out that this happens the first time the insert script is run and not on subsequent launches of Bridge. I.e. the next time Bridge is run, it displays only a single thumbnail entry in Favorites.

I guess one would insert the Favorites thumbnail(s) via script then shut down Bridge and restart it for cosmetic consistency, but that's not fatal.
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
New Here ,
Jul 05, 2005 Jul 05, 2005
Windows XP/SP 2 - I have a pretty vanilla system for development.
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
New Here ,
Jul 24, 2005 Jul 24, 2005
LATEST
I was seeing the same thing on both Win XP and Mac OS X... I found a work-around by looking at the stockphoto scripts:

Create an event handler and add your thumbnail to favorites once when the Document "create" event occurs.

--Tom
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
Community Beginner ,
Jul 05, 2005 Jul 05, 2005
Interesting. I don't see that, same platform.

I'll check into it a bit.

Bob
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