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: Adam Bell <email@hidden>
- Date: Sun, 08 Oct 2006 11:10:09 -0300
Title: Re: Can't turn off screen savers in System
Preferences
At 10:33 PM -0700 10/7/06, John Baltutis wrote:
On 10/07/06, Bill Cheeseman
<email@hidden> wrote extensively about
his inability to turn off the screen saver:
I've been following this thread since Mr. Cheeseman posted the
original
message. Although I don't understand the AS mechanics well enough to
compose
the script, I offer the following.
Someone's already mentioned that the Screen Saver's "Start screen
saver"setting
is stored in the
~/Library/Preferences/ByHost/com.apple.screensaver.XXXXXX.plist file,
where
XXXXXX is the computer's MAC address sans the colons and where each
field is
twodigits long.
On my machine,
set y to (do shell script "ipconfig getpacket en0 |grep chaddr |
awk '{print
$3}'") returns the MAC address in this form:
->y = "0:30:65:ab:a5:50"
Alternatively in plain vanilla AS, this:
set AppleScript's text item delimiters to
":"
set MACadd to
text items
of (primary Ethernet address of (system
info))
set AppleScript's text item delimiters to
""
MACadd as string
To put the MAC address into a usaable form requires hecking the first
field for
two digits (if only one, then adding a leading zero), which results
in:
->y = "00:30:65:ab:a5:50"
To remove the colons, use text item delimiters, giving
-> y = "003065aba550".
Then, the following lines reset the screen saver slider:
set x to "defaults write " & POSIX path of (path to home
folder)
&"/Library/Preferences/ByHost/com.apple.screensaver." &
"y" & " idleTime XXX"
do shell script x
where XXX = 0, sets the slider to NEVER; otherwise, XXX is in seconds;
e.g., 15
minutes = 900 seconds.
BTW, this only works if System Preferences is not running.
Experienced scripters can put the various pieces together (I don't
have the
time or energy to do the parsing), but hopefully thissolves the
problem.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
>esscable.net
This email sent to email@hidden
_______________________________________________
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