How to avoid JMP Alert window in a JSL
How to avoid JMP Alert window in case no data table is open and despite of this the runing open() is canceled:
Names Default To Here( 1 ); If( N Table() == 0, Open(), ); dt = Current Data Table(); //Create Lauch Window for prompting dialog nw = New Window( "Summary statistics", <ScriptingRe: How to avoid JMP Alert window in a JSLOpen will throw an error if Cancel is pressed and you can catch it with Try-catch.
Names Default To Here(1);
Try(
dt = Open();
,
show(exception_msg);
);
Do error handling in the catch part, example above will just print the message to log and lets script to continue running.
Re: How to avoid JMP Alert window in a JSLThanks for your fast reply. What additional code must be added or changed after the open dialog is canceled (with no alert window) to stop the code from running the dialog window?
Re: How to avoid JMP Alert window in a JSLNames Default To Here( 1 );
If( N Table() == 0,
dt = Current Data Table();
Clear Symbols( dt );
Try( dt = Open() );
If( Is Empty( dt ), throw());
);