Apple shuffle

Apple products are not awesome at shuffling things… whether songs or pictures, Apple products like to pick a dozen and serve them up over and over. Luckily, AppleScript can help us remedy this deficiency for the screensaver:

# Make a folder ~/screensaver-pics
# Make a numbered series of folders containing pictures (I used years)
# Set your screensaver to a picture rotating one like ‘sliding tiles’
# set the images folder to ~/screensaver-pics
# # (note that you have to set the images folder before running this script, because otherwise System Preferences will helpfully dereference the symlink and fail to provide the desired effect)
# Use Cronnix to schedule this script on a time period of your choosing
# # 50 */4 * * * osascript screensaver_rotation.scpt  > /dev/null 2>&1
set destination to POSIX path of (path to home folder) & “screensaver-pics”
set picfolder to “nothing”
tell application “Finder”
set picfolder to (random number from 2009 to 2014) as text
set picsource to POSIX path of (path to home folder) & “Dropbox/incoming/”
end tell
set source to picsource & picfolder
do shell script “rm -rf ” & destination

do shell script “ln -s ” & source & ” ” & destination

%d bloggers like this: