cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Georg
Level VII

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
0 REPLIES 0

Recommended Articles