<?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 How do I stop UI from looking like it hang up while doing long for loop operation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271352#M52814</link>
    <description>&lt;P&gt;I made I UI that lets the user choose which process, temperature and voltage to include in the computation of Cpk, the script will iterate over each combination of process, temperature and voltage. I noticed that the UI hangs up while it is doing its operation. Is there a way to avoid this? I think a function similar to DoEvents in vb6 or better, a background process worker ?&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:28:29 GMT</pubDate>
    <dc:creator>TheRealYeti</dc:creator>
    <dc:date>2023-06-09T23:28:29Z</dc:date>
    <item>
      <title>How do I stop UI from looking like it hang up while doing long for loop operation</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271352#M52814</link>
      <description>&lt;P&gt;I made I UI that lets the user choose which process, temperature and voltage to include in the computation of Cpk, the script will iterate over each combination of process, temperature and voltage. I noticed that the UI hangs up while it is doing its operation. Is there a way to avoid this? I think a function similar to DoEvents in vb6 or better, a background process worker ?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:28:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271352#M52814</guid>
      <dc:creator>TheRealYeti</dc:creator>
      <dc:date>2023-06-09T23:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I stop UI from looking like it hang up while doing long for loop operation</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271424#M52829</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/18968"&gt;@TheRealYeti&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'll attack your question from another direction, your script might be inefficient. I have seen scripts that took hours to run, rewritten to run in a minute or two. Without more details, it is difficult to assess that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given that you know vb6, you could get the user input and your script could generate a JSL script to do the work, but run it via VB6 that uses DoEvents.&amp;nbsp; I do not know that function nor am I a VB expert.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The JMP documentation "Automation Reference" points you to many of the JMP library functions exposed to VB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create a JMP session and make it visible, add the following code to your VB&lt;/P&gt;
&lt;P&gt;script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;Dim MyJMP As JMP.Application&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;Dim JMPDoc As JMP.Document&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;Set MyJMP = CreateObject("JMP.Application")&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;MyJMP.Visible = True&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;The JMP library function, Run JSL,&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;Run JSL&amp;nbsp;&lt;FONT color="#000000"&gt;file&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#000000"&gt;Not sure if any of that helps.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 16:08:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271424#M52829</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2020-06-08T16:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I stop UI from looking like it hang up while doing long for loop operation</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271430#M52831</link>
      <description>&lt;P&gt;If you're looping in JSL you could add calls to caption() to inform the user of progress.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;for (i = 1, i &amp;lt;= 1000000, i++,
	a = i*2;
	b = a^i;
	if (mod(i, 1000) == 0,
		caption("Processing ... " || char(i));
		wait(0);
	);
);
caption(remove);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Jun 2020 16:52:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271430#M52831</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2020-06-08T16:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I stop UI from looking like it hang up while doing long for loop operation</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271435#M52833</link>
      <description>&lt;P&gt;If you are performing a number of time consuming discrete tasks you can use this status widget:&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Activity Status Class" uid="53644" url="https://community.jmp.com/t5/JMP-Scripts/Activity-Status-Class/m-p/53644#U53644" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will give the user status of progress and force screen updates.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2020 17:38:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271435#M52833</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2020-06-08T17:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I stop UI from looking like it hang up while doing long for loop operation</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271539#M52859</link>
      <description>&lt;P&gt;My code runs in under a minute. My concern is that during the process, the GUI (made in JSL) would look like it stopped responding. I think&amp;nbsp; this is because the script and the GUI both run in the same thread (I could be wrong). In VB6, adding DoEvents command inside the for loop can be a quick solution, it allows the UI to update its elements and appear responsive but the total operation would take longer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like the script to be integrated in JMP itself and making it an add-in so other users can just install it and reuse it. If I go down the VB6 path, I'd rather do it completely in VB6, vs generating JSL script using VB6 then execute it. Thank you for giving different approach I appreciate every feedback. :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 07:20:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271539#M52859</guid>
      <dc:creator>TheRealYeti</dc:creator>
      <dc:date>2020-06-09T07:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I stop UI from looking like it hang up while doing long for loop operation</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271540#M52860</link>
      <description>It looks like wait is what I need!&lt;BR /&gt;I will take a look at &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/9612"&gt;@David&lt;/a&gt;'s suggestion next.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Tue, 09 Jun 2020 07:59:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271540#M52860</guid>
      <dc:creator>TheRealYeti</dc:creator>
      <dc:date>2020-06-09T07:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I stop UI from looking like it hang up while doing long for loop operation</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271550#M52865</link>
      <description>&lt;P&gt;or modify code like &lt;LI-MESSAGE title="Progress Bar" uid="21160" url="https://community.jmp.com/t5/Uncharted/Progress-Bar/m-p/21160#U21160" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp; to meet your needs. &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4536"&gt;@David_Burnham&lt;/a&gt;&amp;nbsp;'s status class looks nice too!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 10:34:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-stop-UI-from-looking-like-it-hang-up-while-doing-long/m-p/271550#M52865</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-06-09T10:34:32Z</dc:date>
    </item>
  </channel>
</rss>

