<?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: Continue or abort based on user input. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/449020#M69580</link>
    <description>&lt;P&gt;Use the Set Font Style message....see below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

ID = "part123";
flavour = "Red";
TestYear = "2021"; 
LimFileName  = "EVTeg";

mywin1 = New Window("YOU HAVE SELECTED:",
	&amp;lt;&amp;lt;modal,
	&amp;lt;&amp;lt;Return Result,
	tb = Text Box(
		"Wafer ID: " || ID || " \!nProduct Type: " || flavour || " \!nTest year: " || TestYear ||
		" \!nLimts File: " || LimFileName || " \!nDo you wish to continue?"
	), 
	Button Box("Yes", which_button = "OK"), 
	Button Box("No", which_button = "Cancel"),
	tb &amp;lt;&amp;lt; set font style("bold");
);
show(mywin1); //debug print
If(mywin1["Button"] != 1,
	Show("cancel");
	throw("cancel pressed");
	//stop();
);
Show("ok");
Show("continue execution");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All of the messages that can be sent to the various objects are defined in the Scripting Index.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 03:06:00 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-01-05T03:06:00Z</dc:date>
    <item>
      <title>Continue or abort based on user input.</title>
      <link>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/448980#M69575</link>
      <description>&lt;P&gt;Below is a small script to &lt;EM&gt;check&lt;/EM&gt; &lt;EM&gt;user input&lt;/EM&gt;&amp;nbsp;(below) which I plan to place in another &lt;EM&gt;main&lt;/EM&gt; script. I want to proceed with the rest of the main script if the user selects &lt;EM&gt;OK&lt;/EM&gt; and abort if the user clicks &lt;EM&gt;Cancel&lt;/EM&gt; in the user input script. How to achieve this?.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mywin1 = new window("YOU HAVE SELECTED:", &amp;lt;&amp;lt; modal,
     
      //ID = "part123";
      //flavour = "Red";
      //TestYear = "2021"; 
      //LimFileName  = "EVTeg";
      
      text box("Wafer ID: "||ID||" \!nProduct Type: "||flavour||" \!nTest year: "||TestYear||" \!nLimts File: "||LimFileName||" \!nDo you wish to continue?"),

      button box("Yes", which_button = "OK"),

      button box("No", which_button = "Cancel"),

);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The commented lines were just to test this piece of code. These would be supplied from the &lt;EM&gt;main&lt;/EM&gt; script above the&lt;EM&gt; test user input&lt;/EM&gt; script.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 19:58:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/448980#M69575</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2022-01-04T19:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Continue or abort based on user input.</title>
      <link>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/448999#M69576</link>
      <description>&lt;P&gt;One option would be to use &lt;STRONG&gt;&amp;lt;&amp;lt;return result&lt;/STRONG&gt; with &amp;lt;&amp;lt;modal and then check the value of mywin1["Button"] after modal is closed&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

ID = "part123";
flavour = "Red";
TestYear = "2021"; 
LimFileName  = "EVTeg";

mywin1 = New Window("YOU HAVE SELECTED:",
	&amp;lt;&amp;lt;modal,
	&amp;lt;&amp;lt;Return Result,
	Text Box(
		"Wafer ID: " || ID || " \!nProduct Type: " || flavour || " \!nTest year: " || TestYear ||
		" \!nLimts File: " || LimFileName || " \!nDo you wish to continue?"
	), 
	Button Box("Yes", which_button = "OK"), 
	Button Box("No", which_button = "Cancel"), 
);
show(mywin1); //debug print
If(mywin1["Button"] != 1,
	Show("cancel");
	throw("cancel pressed");
	//stop();
);
Show("ok");
Show("continue execution");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Also &amp;lt;&amp;lt;On validate(expr) and &amp;lt;&amp;lt; On Close(expr) might be helpful&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 20:10:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/448999#M69576</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-01-04T20:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Continue or abort based on user input.</title>
      <link>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/449012#M69577</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks. This seems to be working.&lt;/P&gt;&lt;P&gt;While I test the actual code I have one more question (not related to the OP). How do I make the following text bold?&lt;/P&gt;&lt;P&gt;YOU HAVE SELETED:&lt;/P&gt;&lt;P&gt;Wafer ID:&lt;BR /&gt;Product Type:&lt;BR /&gt;Test year:&lt;BR /&gt;Limts File:&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 22:32:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/449012#M69577</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2022-01-04T22:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Continue or abort based on user input.</title>
      <link>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/449020#M69580</link>
      <description>&lt;P&gt;Use the Set Font Style message....see below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

ID = "part123";
flavour = "Red";
TestYear = "2021"; 
LimFileName  = "EVTeg";

mywin1 = New Window("YOU HAVE SELECTED:",
	&amp;lt;&amp;lt;modal,
	&amp;lt;&amp;lt;Return Result,
	tb = Text Box(
		"Wafer ID: " || ID || " \!nProduct Type: " || flavour || " \!nTest year: " || TestYear ||
		" \!nLimts File: " || LimFileName || " \!nDo you wish to continue?"
	), 
	Button Box("Yes", which_button = "OK"), 
	Button Box("No", which_button = "Cancel"),
	tb &amp;lt;&amp;lt; set font style("bold");
);
show(mywin1); //debug print
If(mywin1["Button"] != 1,
	Show("cancel");
	throw("cancel pressed");
	//stop();
);
Show("ok");
Show("continue execution");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All of the messages that can be sent to the various objects are defined in the Scripting Index.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 03:06:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Continue-or-abort-based-on-user-input/m-p/449020#M69580</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-01-05T03:06:00Z</dc:date>
    </item>
  </channel>
</rss>

