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

Wait for content thumbnails to refresh listener. How?

Enthusiast ,
Jun 19, 2013 Jun 19, 2013

Hi

On Bridge CS6 I have some action (any action...) to run over a group of image thumbnails but, when I select a folder with images, Bridge build in first place the cache for the contents of that folder opened for the first time.

I want to make a condition to run my action IF the refresh is finished.

>> f refhesh is over >> run my action

>> and if not over wait until is really over

(I have also to think if the user selects another folder before my first action is over on the previous folder: may be could warn to wait...?? or queue it to run it next...)

TOPICS
Scripting
689
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
Guru ,
Jun 20, 2013 Jun 20, 2013

There is a document event called loaded you should look at… This lets you know when the document caching is done…

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
Enthusiast ,
Jul 25, 2013 Jul 25, 2013
LATEST

I have realized that this event 'loaded' is called:

  • Once: when a folder is browsed for the first time getting new thumbnails (children). It is called after the built of all thumbnails, but before (and if) generating full previews;

  • Twice: when a folder was browsed before and is select again. In this case, the event is called at the moment that the folder is clicked and again a second time, after the built of all thumbnails, but before (and if) generating full previews;

This was a bit trouble to solve, but my aim was to call only once a function with this to behaviors every time I select or reselect a folder.

I have used setEnv to personalise a bollean variable with the name of the folder (in my case it never repeats). The function runs only once with each folder.

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