Skip to content

Instantly share code, notes, and snippets.

@z-------------
Created May 13, 2014 10:13
Show Gist options
  • Save z-------------/9d1be4db260f5ff684ba to your computer and use it in GitHub Desktop.
Save z-------------/9d1be4db260f5ff684ba to your computer and use it in GitHub Desktop.
on quit
display dialog "Really shut down?" buttons {"No", "Yes"} default button "No"
if the button returned of the result is "Yes" then
display dialog "Are you sure?" default answer "No"
if text returned of the result is "Yes" then
display dialog "Are you really sure?" default answer "Really no"
if text returned of the result is "Really yes" then
continue quit
end if
end if
else
display dialog "Cancelled shutdown :D"
end if
end quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment