On 2006-10-04, at 15:07:06, Bill Cheeseman wrote:
Am I correct in understanding you guys to say that the above long-form script works on 10.4.6 and on 10.4.8 Intel while my short form doesn't? I ask, because neither the short-form nor the long-form works for me on 10.4.8 PPC -- with or without the 'select' line.
I had not tried your exact script until just now. The results are the same. Please file a duplicate bug because this:
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preference.dock"
end tell
tell application "System Events" to tell application process "System Preferences"
tell window 1 to tell slider 2 to set value to 1.0
end tell
does not keep the assigned value between reboots (although it seems to hold between invocations of System Preferences). Therefore, the problem is systemic.
In my script, I work around the problem by turning off the requirement of a password to wake from sleep and screen saver. That way, the screen saver popping up too soon doesn't really slow down my workflow, because the screen saver goes away when I move the mouse. But I would rather not see it at all. (My script is really a pair of scripts, one to make my laptop as usable as possible when I'm in the security of my own home, and the other to make it as secure as possible -- password protection on everything, and drop into screen saver mode as quickly as possible -- when it's sitting on my desk at work.)
I can certainly empathize with this problem. Perhaps there's another way if you use different peripherals in the different locations. Like snag some unique property of the device and use it in a login item to set your prefs (à la kai's shell script).