HyperCard: XCMD To Restart & Shutdown Macintosh


Do you know of a HyperCard XCMD that can restart the Macintosh?

There are several XCMDs and XFCNs capable of restarting or shutting down a
Macintosh. One, named "doRestart," restarts the Macintosh without any further
notice. The other, named "ShutDown," does a normal shutdown as if you had
selected Shut Down from the Finder's Special menu. The "Shutdown" XCMD
eventually corrupts any stack it's used in. It's just a matter of time before
the user shuts the system down without HyperCard having done its housekeeping
chores. The shareware "SafeShutDown" by Christopher Watson seems to be safe
(there have been no reports of corrupted stacks with it). None of these is an
Apple-supported solution.

Caution should be used when executing these, especially while MultiFinder
is running. It is possible that other applications may not be able to
clean up properly before the system restarts or shuts down.

An easier, faster and safer way to do this is to create a QuicKey sequence
for HyperCard to execute.

The HyperTalk script might look like:

on doMenu which
if which = "Quit" then
type "Q" with Command key and Option key
...
...

where Command Option Q calls a quicKey sequence that quits HyperCard and
then does a Finder shutdown.


Published Date: Feb 18, 2012