Sleep timer

a very basic version of this: Discontinued Apps | MacUpdate

display dialog "How many minutes until sleep?" default answer ""
set a to text returned of result
display dialog "Your computer will go to sleep in " & a & " minutes."
delay a * 60
tell application "Finder" to sleep

Model: Powerbook G4 Aluminum
AppleScript: ?
Browser: Safari 312
Operating System: Mac OS X (10.3.9)

If you have an older machine, one that shuts down the PCI bus, for which CPU sleep can be a disaster because one or more of the PCI cards (often a video card) won’t wake up properly (screen stays black), then you can still power off your display and spin down your drives with this:

do shell script "sudo pmset dim " & a & " spindown " & a password "YourPasswordHere" with administrator privileges -- do not use sudo here with OS X 10.4 (Tiger)

where “a” above is already in minutes, 0 means “Never”, and 1 is the minimum setting (sleep display/drives in one minute).

If you don’t like your password in the clear, see the code exchange item on passwords.

As this is not a complete solution, I’ve moved this to Mac OS X. - admin

I guess I misunderstood your invitation in the Code Exchange introduction at, in particular:

It is the word “snippet” that mislead me ” it doesn’t imply “complete solution” to me, so perhaps you might clarify your invitation in that forum.