It looks like Eric's solution works in (soon-to-be-released) JMP 12, but JMP 11 has a different behavior.
One problem in the original script is that w1 cannot be used until the New Window call completes, and in the case of a Modal window the call does not complete until the window is dismissed! And because the window is gone by the time the call returns, the return value from a Modal call to New Window is not a window reference at all. Instead it is {Button(1)} if OK was pressed and {Button(-1)} if Cancel was pressed.
Fortunately, you can send a <<Close Window message to any display box. The following script should work in either JMP 11 or JMP 12:
w1 = New Window( "New Window",
<<Modal,
// Get user input,
H List Box(
Button Box( "OK",
// Proceed with option 1
),
b = Button Box( "Other OK",
b << Close Window;
// Proceed with option 2
),
Button Box( "Cancel", Throw( "Script cancelled by user." ) )
)
);
Note that the behavior for the added button is closer to 'Cancel' than 'OK' - the return value w1 will be {Button(-1)} for the "Other OK" button and the On Validate() script [if it exists] will not be run. That's ok - you can simply do your own validation within the button script, but keep this in mind if looking at the return value from New Window().