10.6: Sleep computer via AppleScript

[Original Article: 10.6: Sleep computer via AppleScript • comment by: dickg]
One of the problems I found with “pmset sleepnow” is that it didn’t give what drives it a chance to get out of the way. I have a simple solution, documented at this web address:

Source: Mac OSX Hints