我有一个对话框,有两个按钮,“确定”和“取消”,我想让“确定”按钮启动一个网站,取消按钮将停止脚本。现在“确定”和“取消”按钮都在启动网站。我在这里错过了什么?
osascript -e 'tell app "System Events" to display dialog "Things are broke \r \rPress OK to launch Google" buttons {"Cancel", "OK"}'
if [ "button returned:OK" ]; then
open "http://www.google.com"
else
exit 0
fi