Choose Language Hide Translation Bar
Highlighted
vince_faller
Super User

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
0 Kudos