
I use a minimal AppleScript to sleep my computer after nn minutes of playing music through iTunes. After upgrading to 10.6, my older solutions (
tell application "Finder" to sleep or
tell application "System Events" to sleep) were ineffectual, so I searched for another solution, and came up with this:
do shell script "pmset sleepnow"
This seems like the only way to enter sleep mode after the password-required activation of display sleep (or the screensaver). Note that I've only tried this from an administrator account, where it works fine.