4 Replies Latest reply on Jan 14, 2013 2:37 AM by Andreas Jansson

    JS ScriptUI window too busy to accept a click

    Andreas Jansson Level 2

      I have a script that shows a Script UI 'window' (resizable, with minimize/maximize buttons etc).

      The users can keep this interface minimized or put it beside the document, and still work with the active document (which is good).

      (A previous interface for the same "main import code", used the old InDesign modal dialogue, that did not allow this.)


      My problem is that as soon as I click the "start" button on this ScriptUI window, I can no longer interact with the form, until it's all done. It seems to be "too busy" to interact with anything at all, while running the main code loop. I can't even move the window.

      The Esc (Escape) button does not work (I wouldn't expect it to either).


      When the main loop (initiated by the Start-button) is done, the form is accessible again.


      Is there a way to let the main code "wait" a fraction of a second, to let it accept button clicks? I'd like to have an abort button on the window, or just any way to let a user abort the script code before it's all done.