Hey,
I'm trying to make a two-button dialog box, if one button is pressed, it sets a variable to [1], if the other button is pressed, it sets the variable to [2]
This is my code:
With this method, clicking [ok] sets the variable to [1], but how can I get it so clicking [cancel] sets it to [2]? Or even better, rename the two buttons?
Thanks
I'm trying to make a two-button dialog box, if one button is pressed, it sets a variable to [1], if the other button is pressed, it sets the variable to [2]
This is my code:
Code:
display dialog "Hello world"
set var1 to 1
if var1 is 1 then display dialog "The variable is set to one"
if var1 is 2 then display dialog "The variable is set to two"
With this method, clicking [ok] sets the variable to [1], but how can I get it so clicking [cancel] sets it to [2]? Or even better, rename the two buttons?
Thanks