Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to quickly sleep the display' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to quickly sleep the display
Authored by: garythemacguy on Aug 15, '05 03:49:20PM
My normal day-to-day account is a non-admin account. This script, as it stands, won't work - it assumes that your account is an admin account. However, it turns out, in 10.4 at least (sorry, I don't have 10.3 available to check), it's simple to modify it to work for non-admin accounts.

Simply add

  user name "string"
to each of the 'pmset' lines.

eg

do shell script ("pmset displaysleep 1") ¬
  user name "your_admin_account name" ¬
  password "your_admin_password" ¬
  with administrator privileges

Many thanks for this tip - I'll certainly be making use of it, both in this context and maybe in others!!

[ Reply to This | # ]