<?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: Can I close the jmp program from a script? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28886#M19217</link>
    <description>&lt;P&gt;That did the trick. Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2016 07:08:33 GMT</pubDate>
    <dc:creator>martin_snogdahl</dc:creator>
    <dc:date>2016-11-08T07:08:33Z</dc:date>
    <item>
      <title>Can I close the jmp program from a script?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28801#M19192</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have created an application in jmp. When the application is run, a series of hidden data tables is created, depending on the user input. When the user decides to close the application window, I would like to run a script to close these open tables before the application is closed.&amp;nbsp;One way to achieve this is to disable the 'red cross' to close the window and define my own button to close the application. Now, how do I disable the ‘red cross’? I’m guessing I have to pass some kind of WinAPI command…&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 09:35:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28801#M19192</guid>
      <dc:creator>martin_snogdahl</dc:creator>
      <dc:date>2016-11-07T09:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can I close the jmp program from a script?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28802#M19193</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;w = New Window(.................................);
w &amp;lt;&amp;lt; On Close(
     loop through the data tables and close them
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can always use an On Close, to take action on an application window, that will save those tables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help==&amp;gt;Scripting Index==&amp;gt;On Close&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 10:23:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28802#M19193</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-11-07T10:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can I close the jmp program from a script?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28803#M19194</link>
      <description>&lt;P&gt;I guess I was over complicating things a bit. My next question: using the application builder, how do I create a reference to the application window? When I use the Current Window() command I get a reference to the Application Builder window, not to the application window it self. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 11:53:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28803#M19194</guid>
      <dc:creator>martin_snogdahl</dc:creator>
      <dc:date>2016-11-07T11:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can I close the jmp program from a script?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28804#M19195</link>
      <description>In the application builder each object, report, etc. is given a name, you should be able to attach the On Close to the appropriate object, including the overall application</description>
      <pubDate>Mon, 07 Nov 2016 12:02:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28804#M19195</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-11-07T12:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can I close the jmp program from a script?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28812#M19198</link>
      <description>&lt;P&gt;Thanks to Dan Schikore for helping me with this same issue. &amp;nbsp;In the script portion of Application Builder put the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(thisModuleInstance&amp;lt;&amp;lt;GetBox) &amp;lt;&amp;lt; On Close(
	close(soc_dataset, nosave);
	close(hlgt_dataset, nosave);
	close(hlt_dataset, nosave);
	close(pt_dataset, nosave);
	close(smq_dataset, nosave);
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Obviously your statements will be different.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 14:22:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28812#M19198</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2016-11-07T14:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can I close the jmp program from a script?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28886#M19217</link>
      <description>&lt;P&gt;That did the trick. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 07:08:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-I-close-the-jmp-program-from-a-script/m-p/28886#M19217</guid>
      <dc:creator>martin_snogdahl</dc:creator>
      <dc:date>2016-11-08T07:08:33Z</dc:date>
    </item>
  </channel>
</rss>

