One touch shutdown
December 8, 2007 4:22 PM Subscribe
Asking for Mr Waterlily: "I would like write a script that starts when the computer starts, goes into a permanent loop, looks to see if a key is pressed, if the key is pressed it would do something, if not it would pause n seconds then loop again.
How does one detect key events in applescript?"
"I am running system 9.1. "
This is for a digital photo frame project made from an old powerbook 1400 we had lying around, if that's at all relevant. He wants it to automatically turn off the machine when a key is pressed (just shutting down instantly without bringing up any menus or options as the power button would). We are not mac people so if there's something easier he's missing, please advise.
posted by waterlily to computers & internet (5 answers total)
If you're not doing this too frequently or you're not too worried about file corruption, holding down the power key on most Macs for an extended period of time will 'bypass' the system menu and directly shut down the machine.
Hope this helps.
posted by onalark at 7:42 PM on December 8, 2007