I checked into doing this via Applescript. Here's a response I got:
"Unfortunately, I don't think you can do this from AppleScript. However, there's still hope.
The Carbon framework enables you to implement a callback to catch and even halt sleep - which would then let you perform your shut down.
The Cocoa frameworks (AppKit's NSWorkspace class in particular) has a notification, NSWorkspaceWillSleepNotification, that can cause sleep to be suspended for up to 30 seconds. You may be able to begin a shut down during those 30 seconds."
I will look into the framework and see what else I can find out. If a small app can be written to do this, we only need run it on startup.
[Edit] Found this: "NSWorkspace now provides sleep notifications. NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification will be sent before the machine sleeps and after the machine wakes, respectively. An observer of NSWorkspaceWillSleepNotification can delay sleep for up to 30 seconds within the handling of the notification."
from here: http://developer.apple.com/releaseno...lderNotes.html
[Double Edit] Crap! I misspelled Mini in the thread title and it shows as "Mine". Changing it didn't fix it. Kandyman, can you fix it?