Choose Language Hide Translation Bar
Highlighted
Georg
Level IV

Save all scripts and close reports by JSL

Trying to write a script for this I found the following below working. JMP15@Win10.

The first part opens two tables and starts some Reports,

and the second Closes all report Windows post saving scripts to belonging tables.

But when the report has a local datafilter, the script is not working any more (get scriptable object doesn't get the Right reference).

Is there a way to find proper reference for each report window, to save the script and close the report? - Thanks

 

// Preparation
Names Default To Here( 1 );
dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" );
dis = dt1 << run script( "Distribution" );
biv = dt1 << run script( "Bivariate" );
one = dt1 << run script( "Oneway" );

dt2 = Open( "$SAMPLE_DATA/Membrane.jmp" );
one2 = dt2 << run script( "Oneway" );

lst_scr = dt1 << Get Table Script Names;
dt1 << Delete Scripts( lst_scr );  // delete all scripts
lst_scr = dt2 << Get Table Script Names;
dt2 << Delete Scripts( lst_scr );  // delete all scripts
Wait( 5 );

// Script performance
Names default to here(1);
win_lst = Get Window List( Type( "Reports" ) );
For( i = 1, i <= N Items( win_lst ), i++,
	obj = win_lst[i][Outline Box( 1 )] << get scriptable object;
	obj << save script to data table;
	obj << close window;
);
Georg
Article Labels