Applescript with notification message override

lirrincity

Registered
I'm running an applescript to close the Mail application before backup as seen below. This script is working but the dialog box is displayed with a "OK and CANCEL" tab and if nothing is clicked the action does not go forward. Is there a way to display the dialogue with the tabs or to override the need for the user to action it?

I'm going to schedule this script with Ical. I'm new to applescript so any suggestion appreciated!

Thanks!!

try
tell application "Mail"
activate
beep
display dialog "Mail application will close in 10 seconds for backup. This program will restart when the backup is completed"
delay 10
beep
quit
end tell
tell the application "Mail" to close
 
Back
Top