<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JScript: WaitForIdle or equivalent in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999574#M641696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petter, thanks for your reply,&lt;/P&gt;&lt;P&gt;I've tried it and it works, but I don't think this example is the best one... When you use a MsgBox or something else where you need the user to execute an action (in this situation click the "ok" button to proceed with the execution of the macro) you stop the execution, so it's not like having it scheduled...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I found the solution to my problem, I'll post it later&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jan 2016 11:42:04 GMT</pubDate>
    <dc:creator>rzenere_avvale</dc:creator>
    <dc:date>2016-01-12T11:42:04Z</dc:date>
    <item>
      <title>JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999565#M641687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm looking for a way to make the WaitForIdle (or equivalent function, even a custom one) work on a JScript macro.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Currently with the lone sleep the screenshot is taken before I can see the layout update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any hint about how to do this in JScript?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 16:16:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999565#M641687</guid>
      <dc:creator>rzenere_avvale</dc:creator>
      <dc:date>2015-12-29T16:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999566#M641688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It has been a while I didn't code in JScript, but I think you can use if you haven't already tried it:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;setTimeout(function() {alert("take your screenshot");}, 1000);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 17:04:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999566#M641688</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-12-29T17:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999567#M641689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also look into using WinJS libraries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/windows/apps/br229706.aspx" style="font-size: 10pt; line-height: 1.5em;" title="https://msdn.microsoft.com/en-us/library/windows/apps/br229706.aspx"&gt;https://msdn.microsoft.com/en-us/library/windows/apps/br229706.aspx&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 17:06:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999567#M641689</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-12-29T17:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999568#M641690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sinan, thanks for your reply&lt;/P&gt;&lt;P&gt;I've already tried that (only difference is the Application.Msgbox instead of the alert) but it's not working... When I use it opens the Edit Module and does nothing at all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 17:23:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999568#M641690</guid>
      <dc:creator>rzenere_avvale</dc:creator>
      <dc:date>2015-12-29T17:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999569#M641691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure about how to use them, using directly &lt;/P&gt;&lt;PRE style="padding: 5px; color: #000000; font-size: 14px; font-family: Consolas, Courier, monospace !important;"&gt;
&lt;P&gt;WinJS.Application.stop(); &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;won't work...&lt;/P&gt;&lt;P&gt;Do I need to import anything? If not, could you make a working example, please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 17:29:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999569#M641691</guid>
      <dc:creator>rzenere_avvale</dc:creator>
      <dc:date>2015-12-29T17:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999570#M641692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you need to download WinJS from this link &lt;A href="https://dev.windows.com/en-us/develop/winjs" title="https://dev.windows.com/en-us/develop/winjs"&gt;WinJS: Windows Library for JavaScript - Windows app development&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apart from this, the only way is to use setTimeout() as far as I know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2015 20:43:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999570#M641692</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-12-29T20:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999571#M641693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried that, but including it in the module gave me many errors: on the WinJS base/ui file there are many strings that ends with a ",", which I'm not sure about... Of course the parser gives me error, and I think they are wrong too... but I hope they left them there for a purpose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still no luck with setTimeout, but thanks for trying&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Let's see if anybody else has an idea/workaround for my problem&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 09:16:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999571#M641693</guid>
      <dc:creator>rzenere_avvale</dc:creator>
      <dc:date>2015-12-30T09:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999572#M641694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is how you can use InputBox and MsgBox from JScript:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// JScript&lt;/P&gt;&lt;P&gt;function Test()&lt;/P&gt;&lt;P&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; personName = qvlib.InputBox("What is you name?")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg = "Hello " + personName + " !"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qvlib.MsgBox(msg)&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 15:32:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999572#M641694</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-12-30T15:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999573#M641695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function Test()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; qvlib.MsgBox('Started.');&lt;/P&gt;&lt;P&gt;&amp;nbsp; app = ActiveDocument.GetApplication();&lt;/P&gt;&lt;P&gt;&amp;nbsp; qvlib.MsgBox( '[' + app.OSName() + ']' );&lt;/P&gt;&lt;P&gt;&amp;nbsp; app.WaitForIdle();&lt;/P&gt;&lt;P&gt;&amp;nbsp; qvlib.MsgBox('Ended.');&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2015 15:44:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999573#M641695</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-12-30T15:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999574#M641696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petter, thanks for your reply,&lt;/P&gt;&lt;P&gt;I've tried it and it works, but I don't think this example is the best one... When you use a MsgBox or something else where you need the user to execute an action (in this situation click the "ok" button to proceed with the execution of the macro) you stop the execution, so it's not like having it scheduled...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I found the solution to my problem, I'll post it later&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 11:42:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999574#M641696</guid>
      <dc:creator>rzenere_avvale</dc:creator>
      <dc:date>2016-01-12T11:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999575#M641697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree - glad to be of some help ... good luck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jan 2016 12:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999575#M641697</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-01-12T12:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999576#M641698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the very late answer, I had literally no time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, this is what I discovered:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Upgrading to QlikView 11.20 &lt;STRONG&gt;SR13 &lt;/STRONG&gt;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&lt;BR /&gt;Side note: at the time I wrote the question I was trying the macro with QlikView 11.20 &lt;STRONG&gt;SR7 &lt;/STRONG&gt;and &lt;STRONG&gt;SR12&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;The right way to call the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;WaitForIdle is this: Application.WaitForIdle(). My mistake was trying to call it using the ActiveDocument...&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thanks to everyone for the help!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jan 2016 10:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999576#M641698</guid>
      <dc:creator>rzenere_avvale</dc:creator>
      <dc:date>2016-01-21T10:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: JScript: WaitForIdle or equivalent</title>
      <link>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999577#M641699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is qvlib?&lt;/P&gt;&lt;P&gt;where do I find reference to this object?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2017 20:45:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JScript-WaitForIdle-or-equivalent/m-p/999577#M641699</guid>
      <dc:creator />
      <dc:date>2017-01-16T20:45:19Z</dc:date>
    </item>
  </channel>
</rss>

