Dear all,
I think this does not work, because with closing the window, the variable and the scope has gone. JMP returns it in a different way. A global variable may work.
So when I struggle with these kind of things, I tend to look in the scripting index for the current way to do this kind of things (they may change somehow from version to version). And I find it as an example for "new window, modal", that I slightly modified, see screenshot and attached script. The reference of the window returns all you need.
Names Default To Here( 1 );
ex = New Window( "Dialog() example",
<<Modal,
<<Return Result,
V List Box(
H List Box( "Set this value", variable = Number Edit Box( 42 ) ),
H List Box( Button Box( "OK" ), Button Box( "Cancel" ) )
)
);
Show( ex );
Show( ex["variable"] );
neb_content = ex["variable"];
Show( neb_content / 2 );
![Georg_0-1616483029871.png Georg_0-1616483029871.png](https://community.jmp.com/t5/image/serverpage/image-id/31452iE0B06D7FE8D0512C/image-size/medium?v=v2&px=400)
Georg