Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mainstay

macrumors 6502
Original poster
Feb 14, 2011
272
0
BC
We keep our photo's on a NAS, which powers down each night and powers on each morning.

In System Preferences >> Screen Savers, I can set the source of the screen saver to be my NAS, and it is great.

However, after each power cycle, this reference to our family photos is lost and the system reverts to the built in images.

Does anyone have a script / program / method for having the Mac auto-reconnect to this network drive and set the Screen Saver settings?

---

I have tried my hand at Automator, but I suck at it.

I have tried a macro recorder which sort of works, but our screen resolution changes often so ABSOLUTE mouse paths are not a viable solution.

I have tried Wally which doesn't set the screen saver and was actually sort of limited in this area.

---

Any thoughts?

This should be simple, right?
 
So, does anyone have any actual answers to this question?

If the answer is no, then OK... so be it, Mac can't do it.

If the answer is yes, then, "yes, it can be done" doesn't really help much.

I'm looking for something along the lines of, "yes, this program/script/whatever does it... it's only $x"....

thanks guys!
 
Alright, I have no idea if this will work. I didn't test it. Basically copy and paste it into a blank Applescript document and try it out.

Code:
set volumeName to "PUT VOLUME NAME HERE" --The name of the mounted volume
set userName to "USERNAME" --The username that is needed to mount the volume
set userPass to "PASSWORD" --The password that is needed to mount the volume
set nasAddress to "ADDRESS" --The IP or Bonjour address of the NAS
set fsKind to "AFP" --The network fileshare type: afp, smbfs, ftp, or nfs
set directPath to "PATH" --This must be the direct path of the folder that stores the pictures. Example /Volumes/Macintosh HD/Users/Intell/Pictures/Background/

try
	do shell script "mkdir /Volumes/" & volumeName & "; mount_" & fsKind & " " & fsKind & "://" & userName & ":" & userPass & "@" & nasAddress & "/" & volumeName & " /Volumes/" & volumeName & "/"
on error errMsg
	display dialog "Something went wrong: " & errMsg
end try

try
	do shell script "defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedFolderPath " & directPath
on error errMsg
	display dialog "Something went wrong: " & errMsg
end try
 
this is something to bite into - thank you!

"Expected end of line, etc. but found unknown token."

it's in the write to com.apple.etc. section...

will try and learn some syntax and go from there.

Thank you for the help!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.