• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Toggle Screensaver
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggle Screensaver


  • Subject: Re: Toggle Screensaver
  • From: "Adam Bell" <email@hidden>
  • Date: Sat, 18 Feb 2006 00:53:40 -0400

I wasn't leaving the panel open, Kai, I was closing it before I ran the script and opening it after I did. I engage the ScreenSaver with a simpler statement that always works, even by itself:

activate application "ScriptSaverEngine"

I wasn't doing that for my tests, but will copy your script again tomorrow and try again (just now, I am going to have a large Macallans with a wee bit of water and go to bed)

Cheers;

Adam

On 2/17/06, kai <email@hidden> wrote:

On 18 Feb 2006, at 00:53, Adam Bell wrote:

> That sets them on my machine (for which there are 7, none named
> slideshow), but the screen saver panel stays the same and the
> screen saver does not engage (I changed your timing to 1 minute no
> matter what was there). 10.4.5 G5

It changes the slider position here - but not if System Preferences
remains open when the script is run. (Generally, it's not a good idea
to edit plist files when related apps are open.)

One (slightly inelegant) way to coax the screensaver engine to kick
in after the prescribed period might be to launch it briefly when the
setting is changed:

-----

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
                exit repeat
        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      (
 _______________________________________________
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

  • Follow-Ups:
    • Re: Toggle Screensaver
      • From: kai <email@hidden>
References: 
 >Re: Toggle Screensaver (From: kai <email@hidden>)
 >Re: Toggle Screensaver (From: "Adam Bell" <email@hidden>)
 >Re: Toggle Screensaver (From: kai <email@hidden>)

  • Prev by Date: do shell script- sed conundrum
  • Next by Date: Re: Toggle Screensaver
  • Previous by thread: Re: Toggle Screensaver
  • Next by thread: Re: Toggle Screensaver
  • Index(es):
    • Date
    • Thread