cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
shashivenky
Level I

Non-Modal windows/user-interactive script

Hi,

 

Details of my script:

Part 1: open a new table so that user fills values

Part 2: wait for the user to fill values and take the response to proceed

Part 3: proceed with the remaining script

 

I am struggling in part 2 because if I use Modal windows, I cannot fill the values in the table.

I would like to generate a new window which will wait on user input OK" to proceed but should not interrupt the user while filling data in the table.

I have tried 

 

Q = New Window("Please click OK when done", <<Modal, Button Box("OK"), Button Box("Cancel"));
If(Arg(Q[1], 1) == 1, *rest of the script*, Wait(5)).

But this is highly ineffective as the Modal interrupts and prevents from any other user input.

I tried without Modal, but the If clause didn't seem to work.

Please suggest a better way (if any) to model this instead of a *wait(n)* statement.

 

Appreciate your help!
Thanks

2 REPLIES 2

Re: Non-Modal windows/user-interactive script

What about writing the script to be run to the data table you have created? It could be called 'Run me after entering the data'.
txnelson
Super User

Re: Non-Modal windows/user-interactive script

If you structure your program into function() and/or Expr() elements you can use non modal user input windows which will allow for the user to do other JMP activities and then when ready, run items from the user window that you created.  The script below is a very simple example

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA\Big Class.jmp" );

ShowResults = Expr( Show( TheResults ) );

NW = New Window( "User Input",
	Text Box( "Enter in all your data and then Press the Button" ),
	Spacer Box( size( 1, 15 ) ),
	Button Box( "Click Here to Run",
		NW << Close Window;
		TheResults = Col Mean( :Height );
		ShowResults;
	)
);
Jim