cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
vince_faller
Super User (Alumni)

Get batch/interactive mode

I'm wondering if there's a way to get suppress modal windows natively.  Batch interactive doesn't seem to.  

 

Names default to here(1);
batch interactive(1);

new window("Test", <<Modal, 
	Textbox("I don't want this to show up if in batch interactive")
);
batch interactive(0);

So I'm wondering if there's a way to get the current batch interactive mode so I can do something like this.  

Names default to here(1);
batch interactive(1);
if(batch interactive(), // or some other internal variable
	print("YAY")
, // else
	new window("Test", <<Modal, 
		Textbox("I don't want this to show up if in batch interactive")
	);
); 
batch interactive(0);

Obviously I can make my own batch variable but I'm wondering if there's anything built in.  

 

Vince Faller - Predictum
3 REPLIES 3
hogi
Level XI

Re: Get batch/interactive mode

Thanks for the info.

With some help of JMP support : )

batch interactive(boolean) returns the previous setting.


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", <<Modal, 
		Textbox("I don't want this to show up if in batch interactive")
	);
);   

 

vince_faller
Super User (Alumni)

Re: Get batch/interactive mode

Mine always starts with 1, which makes me think JMP is in batch.  Which it's definitely not.  When you start up does the first return give you 0? 

Vince Faller - Predictum
hogi
Level XI

Re: Get batch/interactive mode

good point ...