Automatically Shutting the screen off on a Dalmation iMac

Fahrvergnuugen

I am the law!
So every night when my girl friend goes to sleep, she goes into system prefs and changes her energy saver prefs so that the screen turns off after one minute. The next morning she wakes up and switches it back to "never".

This is because, to my knowledge, there is no other way to turn the screen off on an iMac aside from putting it to sleep [and there are a wide variety of reasons as to why neither of us ever puts our computers to sleep].

What would be nice would to be able to create a cron job that changes the setting automatically at certain times of the day. Is there a way to do this?

I thought about using apple script, but I'm not very good with it and I don't think that system prefs is evey scriptable. So the script [shell, perl, php, whatever] would have to manually update a prefs file or something. Any ideas?
 
I could really use the same thing....I changed the energy saver settings every night on my G4 iMac as well...I have it in my room, and the light shines in my eyes when I try to sleep...but I need the computer to be awake.
 
well, with your G4 you can just turn the monitor off...but thats not an option with the iMac [unless you are using an apple display I suppose...]
 
screensaver with a black screen, I'm not sure if that comes with OSX, or if I added it from somewhere, but I have a screensaver called 'basic black'. there's a couple that turn screen black currently available through versiontracker
 
Why can't you leave the screen at one minute all day?

The problem with turning the screen all black with a pic, screen saver, etc. is that it isn't necessarily all black. On my iMac, the black is actually pretty bright, so it wouldn't be the same.

You could probably write an Applescript that would check if it's set to 1 minute or never and switch it to the other. Then you just put it on your desktop, your Dock, or somewhere else easily accessible and open it whenever you want to change the setting.
 
you cant leave it on 1 minute all day because its incredibly annoying.
and i dont think you can applescript it because i dont think the system prefs applications is scriptable
 
all programs are scriptable now.

download this : http://www.apple.com/applescript/GUI/

and then install it. it allows you to script the actual user interface of a program.

now save this into a script file:
Code:
tell application "System Preferences"
	activate
end tell

tell application "System Events"
	tell process "System Preferences"
		click menu item "Energy Saver" of menu "View" of menu bar 1
		delay 2
		tell window "Energy Saver"
			tell group 1
				tell tab group 1
					click radio button "Sleep"
					if value of check box "Use separate time to put the display to sleep" is 0 then
						click check box "Use separate time to put the display to sleep"
					end if
					if value of slider 2 is greater than 1 then
						set value of slider 2 to 1
					end if
				end tell
			end tell
		end tell
	end tell
end tell

tell application "System Preferences"
	quit
end tell

that's the one you need!

(sorry i screwed up the page, but this code needs to stay intact) :D
 
Why don't you just press Apple + Option + Eject and put it to sleep manually when you want it to?
 
Back
Top