Re: Can't turn off screen savers in System Preferences
Re: Can't turn off screen savers in System Preferences
- Subject: Re: Can't turn off screen savers in System Preferences
- From: kai <email@hidden>
- Date: Wed, 4 Oct 2006 18:34:50 +0100
On 4 Oct 2006, at 05:50, Philip Aker wrote:
On 2006-10-03, at 20:25:09, kai wrote:
This works for me. Weird because it looks like it's essentially
the same script.
Pretty much. The only real difference is the activate command.
Unfortunately, that doesn't fix the problem here...
10.4.8/Intel
I restarted with no ~/Library/ScriptingAdditions just to make sure.
It still works. I concocted the script with Bill's goal but not his
code. I didn't know the value indicator had its containing slider
as a supervisor so I added a 'select' command in case I had to
change the focus for it to have values. But that turned out to be
unnecessary.
Thanks, Philip. While I'm due to update it shortly, the machine I'm
currently using is still on 10.4.6 - which probably explains our
different experiences.
Another thing I noticed here was that, even though the value
indicator moves to the correct position at the end of the slider -
and the static text confirms a corresponding period of "Never", the
slider's (read-only) help property will still display/return its
previous value. Even the slider's "AXIncrement" and "AXDecrement"
actions, which I tried as a possible workaround, are decidedly buggy
OMM.
Anyway, the combination of the activate command and an upgrade (or
two) would appear to have fixed the behaviour in question (along
with, hopefully, the other issues I've mentioned).
For this particular job, though, I'd personally still opt for the
rather less obtrusive shell approach that I suggested previously - or
even a Property List Suite equivalent:
---------
set f to POSIX path of (path to preferences folder from user domain)
& "ByHost"
tell application "System Events" to set value of property list item
"idleTime" of ¬
property list file (POSIX path of (first file of folder f whose name
starts with ¬
"com.apple.screensaver." and name extension is "plist")) to "0"
---------
Incidentally (in case anyone's interested), it's possible to avoid
some preliminary tab-clicking in the UI, by telling System
Preferences to reveal the relevant anchor of a pane - something like
this:
---------
tell application "System Preferences" to reveal anchor
"ScreenSaverPref" of ¬
pane id "com.apple.preference.desktopscreeneffect"
tell application "System Events" to tell application process "System
Preferences"
set frontmost to true
set value of slider 1 of group 1 of tab group 1 of window 1 to 360.0
end tell
---------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden