I was wondering how would I close all windows from pressing on the yes button, im sure its simple... im just not sure on how to write it the most efficient way.
Not exactly sure what you are after, but maybe something like this?
Names Default To Here(1); nw1_expr = Expr( New Window("1", Text Box("Window1"), H List Box( Button Box("OK"), Button Box("Cancel", << Set Function(function({this}, (this << top parent) << Close Window; nw2_expr; ))) ) ); ); nw2_expr = Expr( New Window("2", Text Box("Window2"), H List Box( Button Box("OK"), Button Box("No", << Set Function(function({this}, (this << top parent) << Close Window; nw1_expr; ))) ) ); ); nw1_expr;
Here is a bit of JSL that seems to close all of the windows and then closes JMP. There may be easier ways.
Names Default To Here( 1 ); cw = Current Window() << get window title; For( i = 99, i >= 1, i--, If( Window( i ) << get window title != cw & Window( i ) << get window title != "", Window( i ) << close window ) ); Main Menu( "exit jmp" );
That's exactly what I was looking for, thank you!