Close a tab in a JMP project by identifying the window with Get Window() and then closing it with Close Window.
project = New Project();
project << Run Script(
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Run Script( "Bivariate" );
dt << Run Script( "Distribution" );
);
Wait( 2 ); // for demonstration purposes
// returns a reference to the open "Big Class - Distribution" window
dist = Get Window( Project( project ), "Big Class - Distribution" ) ;
dist << Close Window();
To close all tabs in a project, use Get Window List << Close Window().
project = New Project();
project << Run Script(
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Run Script( "Bivariate" );
dt << Run Script( "Distribution" );
);
Wait( 2 ); // for demonstration purposes
Get Window List( Project( project ) ) << Close Window();