0
votes
display dialog "Play game?" buttons {"Yes", "No"} with title "Play?"
if {button returned:"No"}
end if

I pressed compile to pretest and this happened:

Applescript error

Can’t make {button returned:"No"} into type boolean.

1
What's AppleScript anyways? Looks like Visual Basic + Bash. - tripulse

1 Answers

1
votes

Try:

set buttonChoice to (display dialog "Play game?" buttons {"Yes", "No"} with title "Play?")
if button returned of buttonChoice = "No" then
    return "no"
end if