error with shutdown timer
Im trying to make a simple app on my desktop so that it displays a dialoge box of 30 60 or 90 . then it will shut down in 30 60 or 90 minutes
display dialog
"How many minutes until shutdown?"
buttons("30", "60", "90")
if result = {button returned:"30"} then
tell application "Finder"
delay 1800
shut down
end tell
end if
if result = {button returned:"60"} then
tell application "Finder"
delay 3600
shut down
end tell
end if
if result = {button returned:"90"} then
tell application "Finder"
delay 5400
shut down
end tell
end if
MacBook Pro (15-inch Mid 2012)