• 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
ScreenSaver settings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ScreenSaver settings


  • Subject: ScreenSaver settings
  • From: Adam Bell <email@hidden>
  • Date: Sun, 08 Oct 2006 12:30:56 -0300

Title: ScreenSaver settings
I use this to toggle my screen saver settings:

set prefPath to POSIX path of (path to home folder) & "/Library/Preferences/ByHost/com.apple.screensaver."
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 ""
if last word of (do shell script (("defaults read " & prefPath & MACadd as string) & " | grep idleTime")) = "0" then
        set idlT to "900" -- 15 minutes
else
    set idlT to "0" -- never
end if
do shell script (("defaults write " & prefPath & MACadd as string) & " idleTime " & idlT)

and this to discover what they are without toggling them.

set prefPath to POSIX path of (path to home folder) & "/Library/Preferences/ByHost/com.apple.screensaver."
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 ""
set SST to last word of (do shell script (("defaults read " & prefPath & MACadd as string) & " | grep idleTime"))

Adam Bell
 _______________________________________________
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: ScreenSaver settings
      • From: kai <email@hidden>
  • Prev by Date: Re: Can't turn off screen savers in System Preferences
  • Next by Date: Re: 10.4 Print Options (Save as PDF)
  • Previous by thread: Re: Backlight using GUI scripting doesn't work...
  • Next by thread: Re: ScreenSaver settings
  • Index(es):
    • Date
    • Thread