Syntax: Get ( LastMessageChoice )
Data type returned: Number
Returns a number corresponding to the button clicked as a result of the Show Custom Dialog script step.
Though it has a value of 1, the default button on a dialog is always on the far right side. For example, if there are three buttons, they will appear in 3-2-1 (Cancel, Maybe, OK) order.
1 for the default button.
2 for the second button.
3 for the third button.
For the following script step, where the default button is labeled OK, the second button is labeled Maybe, and the third button is labeled Cancel:
Show Custom Dialog ["test";"Proceed?"]
If the user chooses OK, Get (LastMessageChoice) Returns 1.
If the user chooses Maybe, Get (LastMessageChoice) Returns 2.
If the user chooses Cancel, Get (LastMessageChoice) Returns 3.
You can then use an If() statement to handle each possibility appropriately.
Note that if a custom dialog has input fields, it is only when the user clicks the default right-most button will the data be inserted into the input field.