Close a tab in a 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
 
dist = Get Window( Project( project ), "Big Class - Distribution" ) ;
// returns a reference to the open "Big Class - Distribution" window
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();

Help created on 7/12/2018