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: nooby on Dec 05, '10 05:35:37AM

I found a simple solution ,
just set the brightness to be very low, so you get the same effect of display sleeping.
a script can be used to switch between normal and low brightness. like below

tell application "System Preferences" to set current pane to pane "com.apple.preference.displays"
tell application "System Events"
tell slider 1 of group 2 of tab group 1 of window 1 of process "System Preferences"
if value > 2.0E-4 then
set value to 1.0E-4
else
set value to 1.0E-3
end if
end tell
set visible of process "System Preferences" to false --to hide the window into background
end tell

hope that helps someone
note you can only get back from this kind of "sleeping" via the script or the brightness key :)



[ Reply to This | # ]