<?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: Get batch/interactive mode in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/775543#M95777</link>
    <description>&lt;P&gt;good point ...&lt;BR /&gt;&lt;BR /&gt;It seems that when we run a script, JMP automatically starts with “&lt;STRONG&gt;&lt;EM&gt;Batch Interactive&lt;/EM&gt;&lt;/STRONG&gt;” set to 1 by default&lt;/P&gt;&lt;P&gt;- such that no warning message appears and interferes with the script.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Which it's definitely not.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Maybe there are different kinds of "warnings"? - and some of them&amp;nbsp;ignore this &lt;STRONG&gt;&lt;EM&gt;default&lt;/EM&gt; &lt;/STRONG&gt;“Batch Interactive” ~&amp;nbsp; 1&amp;nbsp;setting and therefore need an explicit&amp;nbsp;&lt;FONT face="courier new,courier"&gt;batch interactive(1)&lt;/FONT&gt;sent via JSL&amp;nbsp;to "shut up"?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like &lt;FONT face="courier new,courier"&gt;Eval(arg)&lt;/FONT&gt; vs. &lt;FONT face="courier new,courier"&gt;Eval(Eval Expr( .... Expr(arg) ...):&lt;/FONT&gt;&lt;BR /&gt;One part of JMP platforms and functions just need &lt;FONT face="courier new,courier"&gt;Eval()&lt;/FONT&gt; around an argument to fix variable reference issues.&lt;BR /&gt;For the other part, the &lt;FONT face="courier new,courier"&gt;Eval(arg)&lt;/FONT&gt; approach will fail and the user has to fall back to &lt;FONT face="courier new,courier"&gt;Eval(Eval Expr( .... Expr(arg) ... ).&lt;BR /&gt;&lt;/FONT&gt;... and it's the daily fun of JSL scripters&amp;nbsp; &amp;amp; JMP support to find out which function belongs to which group.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2024 15:20:09 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-07-26T15:20:09Z</dc:date>
    <item>
      <title>Get batch/interactive mode</title>
      <link>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/238947#M47215</link>
      <description>&lt;P&gt;I'm wondering if there's a way to get suppress modal windows natively.&amp;nbsp; Batch interactive doesn't seem to.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
batch interactive(1);

new window("Test", &amp;lt;&amp;lt;Modal, 
	Textbox("I don't want this to show up if in batch interactive")
);
batch interactive(0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So I'm wondering if there's a way to get the current batch interactive mode so I can do something like this.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
batch interactive(1);
if(batch interactive(), // or some other internal variable
	print("YAY")
, // else
	new window("Test", &amp;lt;&amp;lt;Modal, 
		Textbox("I don't want this to show up if in batch interactive")
	);
); 
batch interactive(0);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Obviously I can make my own batch variable but I'm wondering if there's anything built in.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 16:24:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/238947#M47215</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2019-12-18T16:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get batch/interactive mode</title>
      <link>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/775489#M95769</link>
      <description>&lt;P&gt;Thanks for the info.&lt;BR /&gt;&lt;BR /&gt;With some help of JMP support : )&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;CODE class=" language-jsl"&gt;batch interactive(boolean)&amp;nbsp;&lt;/CODE&gt;returns the previous setting. &lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

//works for both options 
//batch interactive(0);
//batch interactive(1);

last setting = batch interactive(1); // return value is last setting
batch interactive(last setting); //  reset it in case we set it erroneously
if(last setting,
	print("YAY")
, // else
	new window("Test", &amp;lt;&amp;lt;Modal, 
		Textbox("I don't want this to show up if in batch interactive")
	);
); &lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 20:03:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/775489#M95769</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-07-25T20:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get batch/interactive mode</title>
      <link>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/775500#M95770</link>
      <description>&lt;P&gt;Mine always starts with 1, which makes me think JMP is in batch.&amp;nbsp; Which it's definitely not.&amp;nbsp; When you start up does the first return give you 0?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 20:49:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/775500#M95770</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2024-07-25T20:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get batch/interactive mode</title>
      <link>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/775543#M95777</link>
      <description>&lt;P&gt;good point ...&lt;BR /&gt;&lt;BR /&gt;It seems that when we run a script, JMP automatically starts with “&lt;STRONG&gt;&lt;EM&gt;Batch Interactive&lt;/EM&gt;&lt;/STRONG&gt;” set to 1 by default&lt;/P&gt;&lt;P&gt;- such that no warning message appears and interferes with the script.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;Which it's definitely not.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Maybe there are different kinds of "warnings"? - and some of them&amp;nbsp;ignore this &lt;STRONG&gt;&lt;EM&gt;default&lt;/EM&gt; &lt;/STRONG&gt;“Batch Interactive” ~&amp;nbsp; 1&amp;nbsp;setting and therefore need an explicit&amp;nbsp;&lt;FONT face="courier new,courier"&gt;batch interactive(1)&lt;/FONT&gt;sent via JSL&amp;nbsp;to "shut up"?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like &lt;FONT face="courier new,courier"&gt;Eval(arg)&lt;/FONT&gt; vs. &lt;FONT face="courier new,courier"&gt;Eval(Eval Expr( .... Expr(arg) ...):&lt;/FONT&gt;&lt;BR /&gt;One part of JMP platforms and functions just need &lt;FONT face="courier new,courier"&gt;Eval()&lt;/FONT&gt; around an argument to fix variable reference issues.&lt;BR /&gt;For the other part, the &lt;FONT face="courier new,courier"&gt;Eval(arg)&lt;/FONT&gt; approach will fail and the user has to fall back to &lt;FONT face="courier new,courier"&gt;Eval(Eval Expr( .... Expr(arg) ... ).&lt;BR /&gt;&lt;/FONT&gt;... and it's the daily fun of JSL scripters&amp;nbsp; &amp;amp; JMP support to find out which function belongs to which group.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 15:20:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/775543#M95777</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-07-26T15:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get batch/interactive mode</title>
      <link>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/777659#M95913</link>
      <description>&lt;P&gt;examples for the different behaviors of batch interactive - and the different "default" modes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
testMarkup = Function( {},
       text = Text Box("Bad XML &amp;lt;");
       text &amp;lt;&amp;lt; markup;
);
 
// Run the next four lines individually
testMarkup(); // no special setting: default
batch interactive(1);testMarkup(); // batch interactive is turned "on" so we see an error
batch interactive(0);testMarkup(); // batch interactive is turned off so we can show an error
 
new window("test",buttonbox("Test", testMarkup())); // running jsl in response to a click is not batch interactive mode
new window("test",buttonbox("Test", batch interactive(1);testMarkup())); // set batch interactive to 1 so the error message goes to the log and there is no modal dialog
// the findings:
// default -&amp;gt; no dialog
// 1       -&amp;gt; no dialog
// 0       -&amp;gt; dialog
 
 
// Run the next 3 lines individually to check if formula errors behave the same as above
:col1 &amp;lt;&amp;lt; remove formula(); // no special setting: default
batch interactive(1);:col1 &amp;lt;&amp;lt; remove formula(); // batch interactive is turned "on"" so we see an error
batch interactive(0);:col1 &amp;lt;&amp;lt; remove formula(); // batch interactive is turned off so we can show an error
// the findings:
// default -&amp;gt; dialog (!!!!!)
// 1       -&amp;gt; no dialog
// 0       -&amp;gt; dialog&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;From JMP support, I got the info:&lt;BR /&gt;&lt;EM&gt;The &lt;/EM&gt;&lt;FONT face="courier new,courier"&gt;Batch Interactive()&lt;/FONT&gt;&lt;EM&gt; function is undocumented.&amp;nbsp; The behavior may differ in different situations, and it may change in the future. In effect, it can be considered experimental and unsupported.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 12:37:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Get-batch-interactive-mode/m-p/777659#M95913</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-07-31T12:37:53Z</dc:date>
    </item>
  </channel>
</rss>

