Skip to main content
Pedro Cortez Marques
Legend
June 19, 2013
Question

Wait for content thumbnails to refresh listener. How?

  • June 19, 2013
  • 1 reply
  • 756 views

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

This topic has been closed for replies.

1 reply

Inspiring
June 20, 2013

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

Pedro Cortez Marques
Legend
July 25, 2013

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.