cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Neo
Neo
Level VI

How to display "Script is running, please wait!" for user while JSL script is running

I have a bunch of JMP add-in's which when fired displays a UI window with options for user selection. Pressing the final OK, associated scripts fetch data from data base, does calculation on the data and finally displays the final data table(s) and associated charts. While all this is happening, JMP only shows the hourglass if the mouse cursor is placed on any existing JMP window, otherwise not. Depending on the amount of data, the data fetching and calculation can sometimes take a long time. 

Is there a way to display  (via JSL) to the user a dialog like "Script is running, Please wait!" until the final data tables and charts appear after which the dialog disappears?

When it's too good to be true, it's neither
1 ACCEPTED SOLUTION

Accepted Solutions
matth1
Level IV

Re: How to display "Script is running, please wait!" for user while JSL script is running

I'm not sure if there is a "proper" way to do it, but I create a simple non-modal window with a "please wait" message which I close after the action has completed. 

win_pls_wait = New Window( "Please wait",
	<<Show Menu( 0 ),
	<<Show Toolbars( 0 ),
	Panel Box( "Working...", Lineup Box( N Col( 2 ), Busy Light( <<automatic, size( 40, 40 ) ), Text Box( "Running action..." ) ) )
);
// Open Database( ... )
// or other long action
Try( win_pls_wait << close window );

I guess there's always a risk of the "please wait" window getting left open if the long action causes an error, but for well tested processes it seems to work OK for me. 

View solution in original post

3 REPLIES 3
matth1
Level IV

Re: How to display "Script is running, please wait!" for user while JSL script is running

I'm not sure if there is a "proper" way to do it, but I create a simple non-modal window with a "please wait" message which I close after the action has completed. 

win_pls_wait = New Window( "Please wait",
	<<Show Menu( 0 ),
	<<Show Toolbars( 0 ),
	Panel Box( "Working...", Lineup Box( N Col( 2 ), Busy Light( <<automatic, size( 40, 40 ) ), Text Box( "Running action..." ) ) )
);
// Open Database( ... )
// or other long action
Try( win_pls_wait << close window );

I guess there's always a risk of the "please wait" window getting left open if the long action causes an error, but for well tested processes it seems to work OK for me. 

Neo
Neo
Level VI

Re: How to display "Script is running, please wait!" for user while JSL script is running

@matth1  does the job for me. Thanks.

When it's too good to be true, it's neither
pmroz
Super User

Re: How to display "Script is running, please wait!" for user while JSL script is running

There's also the caption function.

caption("Processing data ");
j = 0;
for (i = 1, i <= 10000000, i++,
	if (mod(i, 100000) == 0,
		j++;
		caption("Processing data " || repeat(".", j));
		wait(0);
	);
);

caption("Done");
wait(3);
caption(remove);