Okay. Thanks Ian. An unfortunate side-effect of the returned hidden FrameBoxes is that the FrameBox title may not match up with the FrameBox number as shown below. I may be able to get my script to work using some other variations on the Try() function.
Names Default To Here( 1 );
Clear Log();
// This function recursively traverses a display tree producing
// a pre-order listing of the names of display boxes that constitute
// the tree. It also looks for each FrameBox (whether displayed or not),
// and gets the name of the parent OutlineBox
preorder = Function( {node},
Local( {chnode},
// Inspect the current node
nodeType = Char( node << className );
Print( "Node: " || nodeType );
If( nodeType == "FrameBox",
// Find the title of the parent outline node of this FrameBox
parent = node << parent;
parentType = Char( parent << className );
While( parentType != "OutlineBox",
parent = parent << parent;
parentType = Char( parent << className );
);
Insert Into( fbTitles, parent << getTitle );
);
// Do the recusrsion
chnode = node << child;
While( Is Scriptable( chnode ),
Recurse( chnode );
chnode = chnode << sib;
);
)
);
// Try out 'preorder' . . .
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Fit Model(
Y( :height ),
Effects( :sex ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:height << {Lack of Fit( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ), Plot Residual by Predicted( 1 ), Plot Effect Leverage( 1 )
}
)
);
report = Report( obj );
fbTitles = {};
preorder( report );
Print( "\!n", fbTitles );
// Select windows.
Wait( 1 );
obj << Bring Window to Front;
For( i = 1, i <= N Items( fbTitles ), i++,
Try(
report[FrameBox( i )] << Select;
win = New Window( "FrameBox Title", <<Modal, Text Box( Eval( fbTitles[i] ) ) );
report[FrameBox( i )] << Deselect;
)
);