cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
‘New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit – register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
SDF1
Super User

JSL: How to auto click JMP Alert "OK" button in pop-up window?

Hi All,

 

  I have a JSL question as I'm stuck with some code that I'm working on right now.

 

  Basically, what I'm doing is using the Special Purpose Space Filling DOE platform to generate a DOE that I need to feed to another JSL routine. The problem is not in getting the JSL to run, but with an automated JMP Alert popup window that appears each time.

 

  Below is the basic code for generating the DOE:

tuntble = DOE(
		Space Filling Design,
		{Add Response( Maximize, "Y", ., ., . ), Load Factors, Set Random Seed( Today() ), FFF Optimality Criterion( MaxPro ),
		Space Filling Design Type( Fast Flexible Filling, ndoe_runs ), Simulate Responses( 0 )}
	);

 I have it set to "Load Factors" from my factors table and generate ndoe_runs number of runs for the DOE. My factor table consists of about 13 factors, some of which might be constant, i.e. not changing during the DOE. The DOE platform always gives an alert popup about constant factors and having them removed from the DOE, which is fine, I can just include them back in the table later. This is what I do in the automated part of the JSL code.

 

 The issue I'm having is that when I run my code in a "line-wise" fashion, I don't get the popup window, I only get following notification in the Scripting Window Log: "Each non-constant factor must have at least two levels. Stopping Load Factors." Again, this is fine, and I'd prefer that only this comes up. But, when I run my larger code as a whole, whenever it gets to the stage where it needs to generate the DOE, it always stops and throws the popup Alert window. As soon as I click "OK", the code continues and runs as expected.

 

  I would prefer to disable this alert for my code only (not JMP as a whole), or if that's not an option, somehow have the JSL code click "OK" for me so that I don't have to manually do it each time. I know how to have JSL click OK when running regular JSL, like on a report window, but I don't know how to access the Alert window's "OK" button to click it.

 

  Any help is much appreciated.

 

Thanks!,

DS

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: JSL: How to auto click JMP Alert "OK" button in pop-up window?

You could check your data and remove any columns that don't vary before loading the factors into the DOE to eliminate the need for the popup altogether.

View solution in original post

3 REPLIES 3
jthi
Super User

Re: JSL: How to auto click JMP Alert "OK" button in pop-up window?

I'm not very familiar with JMPs DOE platform and cannot easily generate the alert you are having. If it is a thrown error, maybe you could try to wrap the code into Try structure. Not sure if the code you want to would still be executed, but it could be worth trying out:

Try(
	code-you-want-to-execute
	,
	show(exception_msg)
);

 

 

-Jarmo
ih
Super User (Alumni) ih
Super User (Alumni)

Re: JSL: How to auto click JMP Alert "OK" button in pop-up window?

You could check your data and remove any columns that don't vary before loading the factors into the DOE to eliminate the need for the popup altogether.

SDF1
Super User

Re: JSL: How to auto click JMP Alert "OK" button in pop-up window?

Hi @ih and @jthi ,

 

  Thanks for the quick feedback and ideas. Sometimes when you're in the thick of coding you miss the obvious solution. Would have liked if the Try() worked, but it didn't block the pop-up window. So, I went with @ih 's solution to just leave the fixed columns out when generating the space filling design and then just put them back in. Quick and easy, just a few extra lines of code and it worked as expected.

 

Thanks again!,

DS