Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jolly Roger Newsgroups: alt.comp.lang.applescript Subject: Re: [Applescript/shell script] how could I change the images folder of the screen saver ? Date: 25 Sep 2015 15:30:11 GMT Organization: People for the Ethical Treatment of Pirates Lines: 136 Message-ID: References: <1mbaqiz.mlg4zx1jpm854N%blanc@empty.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net JrGdkBgXqbYEx0iB/1Tn6AFdqjWXIGVzPxdcKWJrgITVrFRX57 Cancel-Lock: sha1:/zfFHh0wxJfWHUa0xQBMh88KeBA= X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1Y%b|b-Y~()~\t,LZ3e up1/bO{=-) User-Agent: slrn/1.0.1 (Darwin) Xref: csiph.com alt.comp.lang.applescript:7 On 2015-09-25, JiPaul wrote: > Hello everybody, > > The question is in the subject. > I've found how to start a screen saver with AS : > --------------------------- > tell application "System Events" > > set ss1 to screen saver "Arabesque" > set ss2 to screen saver "Flurry" > set ss3 to screen saver "Shell" > set ss4 to screen saver "iLifeslideshows" > set ss5 to screen saver "Word of the Day" > set ss6 to screen saver "iTunes Artwork" > set ss7 to screen saver "Computer Name" > set ss8 to screen saver "BOINCSaver" > start ss3 # (or ss1 or ss2...) > > end tell > -------------------------------- > But that I wish to do, for pictures-based sc savers (like > "iLifeslideshows"), is changing (by AS or shell script) the images > folder. > > And also how to change the style of "iLifeslideshows" (origami, mosaic, > pictures wall, floating pictures, Ken Burns, and so on...) ? Unfortunately, you can't do that with pure AppleScript since Apple does not provide AppleScript interfaces to change those properties. Here is what Apple allows (found in the System Events dictionary): screen saver n : an installed screen saver elements contained by application. properties displayed name (text, r/o) : name of the screen saver module as displayed to the user name (text, r/o) : name of the screen saver module to be displayed path (alias, r/o) : path to the screen saver module picture display style (text) : effect to use when displaying picture-based screen savers (slideshow, collage, or mosaic) responds to start, stop. screen saver preferences object n : screen saver settings properties delay interval (integer) : number of seconds of idle time before the screen saver starts; zero for never main screen only (boolean) : should the screen saver be shown only on the main screen? running (boolean, r/o) : is the screen saver running? show clock (boolean) : should a clock appear over the screen saver? responds to start, stop. Using the defaults command to read defaults for com.apple.screensaver shows just two properties: # defaults read com.apple.screensaver { askForPassword = 1; askForPasswordDelay = 5; } I had a look at these screen saver preference files: ~/Library/Preferences/com.apple.screensaver.plist ~/Library/Preferences/ByHost/com.apple.screensaver.5387F4CD-305A-54DE-B565-463EEBFCF270.plist (The "5387F4CD-305A-54DE-B565-463EEBFCF270" portion of the name of the second file will differ on your system.) The first property list file contains: askForPassword 1 askForPasswordDelay 5 Not much there... The second property list file contains: CleanExit YES PrefsVersion 100 idleTime 300 moduleDict moduleName iLifeSlideshows path /System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver type 0 So it appears the settings you want are stored elsewhere - not sure where, though. If you can find where OS X stores these settings, and if they are stored in a property list (plist) file or another suitable text format, you might be able to use a shell/Perl/whatever script to modify that file. After making any change "under the hood" like this, you'd likely need to restart the cfprefsd daemon with this command to make the changes take effect: # killall cfprefsd -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR