Odd System Preferences problem
Odd System Preferences problem
- Subject: Odd System Preferences problem
- From: jason bergman <email@hidden>
- Date: Sat, 18 Jan 2003 12:34:27 -0500
Unable to find a way to turn off my Apple LCD monitor, I wrote a script to
do the next best thing: it opens System Preferences and changes the sleep
timer to a low level.
It works, in the sense that it does everything it's supposed to, but when I
re-open the system preferences, the slider's gone from being 3 minutes to 3
hours.
I had an extra line in here that hit "view all in categories" figuring that
would apply the changes, but it made no difference.
Here's the code...anyone know why it's doing this?
tell application "System Preferences" to activate
tell application "System Events" to tell process "System Preferences"
tell menu "View" of menu bar 1 to pick menu item "Energy Saver"
delay
tell tab group 1 of group 1 of window 1
click radio button "Sleep"
delay 2
if the value of check box "Use separate time to put the display to
sleep" is 0 then
delay 1
click check box "Use separate time to put the display to sleep"
set the value of slider 2 to 80
set theValue to 1
else
click check box "Use separate time to put the display to sleep"
set theValue to 0
end if
end tell
end tell
-jason
--
jason bergman
http://www.loonyboi.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.