<?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: How can I run a script when exits JMP? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85908#M38375</link>
    <description>Hi Jim,&lt;BR /&gt;&lt;BR /&gt;I love the idea you gave, and it works in my computer. However, as you mentioned, if someone would like to clean all windows from window list, JMP will be closed even users does not intend to. I really appreciate your prompt reply and help.</description>
    <pubDate>Sat, 15 Dec 2018 18:38:21 GMT</pubDate>
    <dc:creator>Tzu-Chun</dc:creator>
    <dc:date>2018-12-15T18:38:21Z</dc:date>
    <item>
      <title>How can I run a script when exits JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85896#M38365</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a way to &lt;A href="https://www.jmp.com/support/help/14/run-a-script-at-start-up.shtml#324309" target="_self"&gt;run a script&amp;nbsp;at start up&lt;/A&gt;. However, what should I do if I would like to run a script when exits JMP?&lt;/P&gt;&lt;P&gt;The following code is an idea for doing that, but it didn't work in JMP.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;win=window("Home Window");
win&amp;lt;&amp;lt;on close(
	new window("Goodbye :)",
		&amp;lt;&amp;lt;modal,
		text box("Thanks for using JMP")
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any thoughts are appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Dec 2018 07:05:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85896#M38365</guid>
      <dc:creator>Tzu-Chun</dc:creator>
      <dc:date>2018-12-15T07:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a script when exits JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85906#M38373</link>
      <description>&lt;P&gt;Here is a little script that works......the key is that one does not have access to the Home Window, but you can get the pointer to the overall JMP environment through &amp;lt;&amp;lt; Top Parent.&amp;nbsp; And it will remain viable as long as the window you go through stays available.&amp;nbsp; So below is my solution to that.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x = New Window( " ");
win = Window( 1 ) &amp;lt;&amp;lt; top parent;
x &amp;lt;&amp;lt; show window(0);
win &amp;lt;&amp;lt; on close(
	New Window( "Goodbye :)", &amp;lt;&amp;lt;modal, Text Box( "Thanks for using JMP" ) );
	quit("no save");
	RunProgram( executable( "C:\Program Files\Windows Media Player\wmplayer.exe" ) );
	
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe someone else can come up with a better reference point to the top parent.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Dec 2018 16:56:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85906#M38373</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-12-15T16:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a script when exits JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85908#M38375</link>
      <description>Hi Jim,&lt;BR /&gt;&lt;BR /&gt;I love the idea you gave, and it works in my computer. However, as you mentioned, if someone would like to clean all windows from window list, JMP will be closed even users does not intend to. I really appreciate your prompt reply and help.</description>
      <pubDate>Sat, 15 Dec 2018 18:38:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85908#M38375</guid>
      <dc:creator>Tzu-Chun</dc:creator>
      <dc:date>2018-12-15T18:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a script when exits JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85917#M38384</link>
      <description>&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/14/compile-scripts-into-an-add-in-using-add-in-buil.shtml#510629" target="_blank"&gt;addin&lt;/A&gt;&amp;nbsp;supports:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A name="510631" target="_blank"&gt;&lt;/A&gt;Click the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="command"&gt;Exit Script&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;tab to add a script that runs when JMP exits or when you disable the add-in. You can select an existing script (&lt;/SPAN&gt;&lt;SPAN class="command"&gt;Run JSL in this file&lt;/SPAN&gt;&lt;SPAN&gt;) or copy and paste in a script (&lt;/SPAN&gt;&lt;SPAN class="command"&gt;Run this JSL&lt;/SPAN&gt;&lt;SPAN&gt;). For example, you could provide a prompt for the user to export a JMP data table upon exiting or disabling the add-in.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 01:11:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/85917#M38384</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2018-12-17T01:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I run a script when exits JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/86004#M38412</link>
      <description>Hi Craige,&lt;BR /&gt;&lt;BR /&gt;This is what I am looking for. Thanks a lot for your prompt help : )</description>
      <pubDate>Mon, 17 Dec 2018 20:36:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-run-a-script-when-exits-JMP/m-p/86004#M38412</guid>
      <dc:creator>Tzu-Chun</dc:creator>
      <dc:date>2018-12-17T20:36:02Z</dc:date>
    </item>
  </channel>
</rss>

