cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
YFan3
Level I

How to add a button to script which could do a smooth transition between two parts in a script

Hi, 

 

I am new to JMP17 and recently would like to add a button between two parts of my script, after first part of my code finished execution. If user click the button and it will run the second part of the script. I have attached a screenshot to here.

 

The trick is in my "New Window()" function, I have a combo box and data selected button to pick data from a graphic builder, I add another button box but it doesn't work cos it only just close the window, not a trigger for next part. I was thinking to add << Modal to new window but it would freeze the window until I click the OK button so I can't select any data from graphic builder. My idea would be My idea would be If I could get a return value when I click the button, and I can set a condition if that return value is true and then perform the second part of the script but I am not sure if JMP could do it or if you have any good idea to help me out!

 

YukuanMicrosoftTeams-image (1).png

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to add a button to script which could do a smooth transition between two parts in a script

I think one way to do this would be to move the code from what is currently your second section to just after the "OK" button is pressed. So, line 51 of your code would look like this:

Button Box ("OK", 
	var1 = 2;
	//iFile <= N Items ( fileNames )
	//Loop through sensor data files
	For( iFile = 1, iFile <= N Items ( fileNames ), iFile++,
	//etc

View solution in original post

2 REPLIES 2

Re: How to add a button to script which could do a smooth transition between two parts in a script

I think one way to do this would be to move the code from what is currently your second section to just after the "OK" button is pressed. So, line 51 of your code would look like this:

Button Box ("OK", 
	var1 = 2;
	//iFile <= N Items ( fileNames )
	//Loop through sensor data files
	For( iFile = 1, iFile <= N Items ( fileNames ), iFile++,
	//etc
YFan3
Level I

Re: How to add a button to script which could do a smooth transition between two parts in a script

Thanks a lot Jed! It works for me perfectly!!!