• 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: Scripting OS X Preferences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting OS X Preferences


  • Subject: Re: Scripting OS X Preferences
  • From: bill <email@hidden>
  • Date: Mon, 17 Feb 2003 12:13:40 +0800

> defaults read com.apple.preference.screensaver
>
> I get an error: "Domain com.apple.preference.screensaver does not
> exist."

In Terminal.app, try this one:

defaults -currentHost read com.apple.screensaver

Then, wrap it in do shell script:

do shell script "defaults -currentHost read com.apple.screensaver"
-- "{
askForPassword = 1;
hotCorners = ((0, 1, 0, 0));
idleTime = 300;
moduleName = Flurry;
modulePath = \"/System/Library/Screen Savers/Flurry.saver\";
}"

If you need the module name only:

do shell script "defaults -currentHost read com.apple.screensaver
moduleName"
-- "Flurry"

To change the module, you only need to change the value of modulePath,
however, to avoid confusing, change the moduleName all together:

do shell script "defaults -currentHost write com.apple.screensaver
moduleName Cosmos"
do shell script "defaults -currentHost write com.apple.screensaver
modulePath '/System/Library/Screen Savers/Cosmos.slideSaver'"


Have fun :)
bill
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Script Debugger goes renegade !
  • Next by Date: Print Center
  • Previous by thread: Scripting OS X Preferences
  • Next by thread: Folder: alias:true/false property
  • Index(es):
    • Date
    • Thread