display dialog "Play game?" buttons {"Yes", "No"} with title "Play?"
if {button returned:"No"}
end if
我按下编译进行预测试,发生了这种情况:
Applescript错误
无法将{按钮返回:"否"}变为类型布尔值。
答案 0 :(得分:1)
尝试:
set buttonChoice to (display dialog "Play game?" buttons {"Yes", "No"} with title "Play?")
if button returned of buttonChoice = "No" then
return "no"
end if