Re: Programmatically change screen saver settings

2015-03-01 Thread Juanjo Conti
I was able to do it this way. Reading: var moduleDict = CFPreferencesCopyAppValue("moduleDict", "com.apple.screensaver") as NSDictionary var saverName = moduleDict["moduleName"] as String! Writing: var moduleDict = CFPreferencesCopyAppValue("moduleDict", "com.apple.screensaver") as NSDictionary

Re: Programmatically change screen saver settings

2015-02-28 Thread dangerwillrobinsondanger
You should read the docs and expect that some domains may require admin rights or even possibly not be accessible by design. From CFPreferences docs Note that modification of some preferences domains (those not belonging to the “Current User”) requires root privileges (or Admin privileges prio

Re: Programmatically change screen saver settings

2015-02-28 Thread Juanjo Conti
Sorry, my code is Swift. There is no @"strings". On Sat, Feb 28, 2015 at 10:14 PM, Graham Cox wrote: > > > On 1 Mar 2015, at 12:46 am, Juanjo Conti > wrote: > > > > This settings are not accesibles via NSUserDefaults but they are via CF. > > > > I was able to do this by code > > > > var moduleD

Re: Programmatically change screen saver settings

2015-02-28 Thread Graham Cox
> On 1 Mar 2015, at 12:46 am, Juanjo Conti wrote: > > This settings are not accesibles via NSUserDefaults but they are via CF. > > I was able to do this by code > > var moduleDict = CFPreferencesCopyAppValue("moduleDict", > "com.apple.screensaver") as CFDictionary > > but when I try to get on

Programmatically change screen saver settings

2015-02-28 Thread Juanjo Conti
Hi, I'm trying to programmatically change the configured screen saver. If I do $ defaults -currentHost read com.apple.screensaver { CleanExit = YES; PrefsVersion = 100; idleTime = 600; moduleDict = { moduleName = ; path = "/Users/juanjo/Library/Screen Saver