How to evaluate the result of a dialog box
I created an "Update" button and when the button is clicked, "updateDeciles" script will run (see below). First, a dialog box will open, if the "Cancel" button is click, exit script; if the "OK" button, check the inputs and then continue the rest script. My script for "Cancel" doesn't work. I searched Script Guide and didn't find anwser. Any help will be appreciated.
....
....
Border Box(Button Box("Update",Eval(updateDeciles)))
......
......
updateDeciles = Expr(
Dialog(
"Submission Weights in Decile", variable1=EditNumber(),
"Hit Ratio% Weights in Decile", variable2=EditNumber(),
Button("OK"),Button("Cancel")
);
IF(Button(-1) = true, exit Script(?))
a = variable1
b = variable2
IF(a = "",throw("input submission weights"));
IF(b = "",throw("input HitRatio% weights"));
.......
.......
)