Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rzenere_avvale
Partner - Specialist II
Partner - Specialist II

JScript: WaitForIdle or equivalent

Hi everyone,

I'm looking for a way to make the WaitForIdle (or equivalent function, even a custom one) work on a JScript macro.

What I'm trying to achieve is to pause the application (not make it "sleep", as I've already done with custom code) in order to select a value on a field and give time to the application to "update the layout" with the selection before taking a screenshot.

Currently with the lone sleep the screenshot is taken before I can see the layout update.

Do you have any hint about how to do this in JScript?

12 Replies
petter
Partner - Champion III
Partner - Champion III

Agree - glad to be of some help ... good luck

rzenere_avvale
Partner - Specialist II
Partner - Specialist II
Author

Sorry for the very late answer, I had literally no time

Anyway, this is what I discovered:

  • Upgrading to QlikView 11.20 SR13 the actions are executed in the right order (so they truely wait till the end of the previous action). Anyway this solved my problem only partially, because from batch the macro wasn't working properly once again. Calling the right way the WaitForIdle (see below) solved my problem
    Side note: at the time I wrote the question I was trying the macro with QlikView 11.20 SR7 and SR12.
  • The right way to call the WaitForIdle is this: Application.WaitForIdle(). My mistake was trying to call it using the ActiveDocument...


Thanks to everyone for the help!

Not applicable

what is qvlib?

where do I find reference to this object?