Use xpath to select all the Oneway objects, and then send the Dispatch message to all of them at once. I don't have your data, but it worked magnificently on the Big Class data in the sample data library, even if you have a By variable. This *should* work directly:
list_y = {"Y1", "Y2"};
dlg = Column Dialog( x = ColList( "X", Max Col( 1 ) ) );
If( dlg["Button"] == 1,
xCol = dlg["x"]
);
dlg = Column Dialog( by = ColList( "By", Max Col( 7 ) ) );
If( dlg["Button"] == 1,
byCol = dlg["by"]
);
//Name the oneway analysis object 'tmp'
tmp = OneWay( Y( Eval( list_y ) ), X( Eval( xCol ) ), By( Eval( byCol ) ) );
//get the window containing the one-way analysis
win = tmp << report;
//Select all the oneway objects and alter all the y-axes
(win << xpath( "//OutlineBox[@helpKey='Oneway Report']" )) << Dispatch(
{},
"1",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12 ), Inc( 1 ), Minor Ticks( 8 ), Show Minor Grid( 1 ), Show Major Grid( 1 )}
);
Here's another example with Big Class:
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
win = (dt << Oneway( Y( {:height, :weight} ), X( :age ), By(:Sex) )) << Report;
(win << xpath( "//OutlineBox[@helpKey='Oneway Report']" )) << Dispatch(
{},
"1",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12 ), Inc( 1 ), Minor Ticks( 8 ), Show Minor Grid( 1 ), Show Major Grid( 1 )}
);
-- Cameron Willden