Re: Toggle Screensaver
Re: Toggle Screensaver
- Subject: Re: Toggle Screensaver
- From: kai <email@hidden>
- Date: Sun, 19 Feb 2006 00:50:26 +0000
On 19 Feb 2006, at 00:23, Adam Bell wrote:
Your script began working perfectly when I simply trashed all but
the most current version of the com.apple.screensaver .plist files.
That's why I asked (18 Feb 2006, at 16:32) whether you had only one
plist file containing an idleTime key, Adam. If there *was* more than
one, it could have explained why the script was failing on your
machine. The "relatively simple fix" that I alluded to involved
deleting the 'exit repeat' statement (which ensures that *all* files
with an idleTime key are amended):
--------
set f to (path to preferences folder as Unicode text) & "ByHost"
tell application "Finder" to set l to (folder f's files whose name
starts with ¬
"com.apple.screensaver" and name does not contain "slideshow")
repeat with i in l
set p to (i as Unicode text)'s POSIX path
tell application "System Events" to tell property list item ¬
"idleTime" of property list file p to if exists then
if value is 0 then
set value to 180
else
set value to 0
end if
end if
end repeat
tell application "ScreenSaverEngine"
launch
quit
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