(* ForcedShutDown Jason Healy (jhealy@suffieldacademy.org) This script warns the user that an automated shutdown is about to happen, and gives them a short time to cancel the shutdown. If the user approves the shutdown (or doesn't cancel in time), the system shutdown begins. *) tell application "Finder" activate beep display dialog "You are running on emergency battery power. An automated shutdown will begin in 10 seconds." buttons {"Cancel Shutdown", "Proceed With Shutdown"} default button 2 giving up after 10 if the button returned of the result is "Cancel Shutdown" then beep display dialog "Shutdown aborted. You must shut the machine down manually." buttons {"OK"} default button 1 else shut down end if end tell