Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

One way to randomize order of an iPhoto slideshow Apps
There are two ways to have a slideshow in iPhoto. From within an album, you can click the Play button and get a quick slideshow. With this method, you have the option to shuffle the order, and play music -- but you can't "fit" the duration of the slideshow to the music.

The other way is to create a slideshow in the sidebar. Here you have the option of setting the duration of each slide to match that of the music (in my case, I had a 20 minute montage), but there is no way to randomize the order -- you have to drag by hand to set the manual order.

My idea is to title the photos with a random number, then sort by title, thereby randomizing the images. Run this AppleScript in Script Editor to do just that:
tell application "iPhoto"
  --tell album "photos"
  -- Note: change the album name above to reflect the album
  -- whose images you'd like to re-title, then remove the "--"
  -- at the beginning of the line. Note that if you leave it
  -- as "photos," then *every* image in your library will be
  -- re-titled!
    repeat with aPhoto in photos
      set title of aPhoto to ((random number 1000) as string)
    end repeat
  end tell
end tell
Note: This solution assumes that you have created a separate iPhoto (v7) library for the slideshow, as it re-titles all the images in the library. It is easy to change this to only randomize a specific album; just change the album name in the script from photos to the album name.

After running the script, select Choose View » sort by » Title in the menu. Then select all, and create a new slideshow in the sidebar. Its order will be randomized.

[robg adds: I modified the script to add the comments and comment out the tell album line. To use the script, please follow the instructions to provide an album name and remove the tell album... line's comment marker. I did it this way because this script will re-title your images, and I didn't want anyone accidentally overwriting their laboriously-applied image titles in their main library. Creating a separate slideshow-only library is the best solution; iPhoto's help explains how to create a new library if you're not familiar with the process.]
    •    
  • Currently 3.25 / 5
  You rated: 2 / 5 (8 votes cast)
 
[32,773 views]  

One way to randomize order of an iPhoto slideshow | 3 comments | Create New Account
Click here to return to the 'One way to randomize order of an iPhoto slideshow' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Slight correction
Authored by: googoo on Mar 12, '08 08:48:48AM
Rob,

If you comment the tell album "photos" command, you must also comment the corresponding the end tell command.

-Mark

[ Reply to This | # ]
One way to randomize order of an iPhoto slideshow
Authored by: Old Toad on Mar 12, '08 10:35:39AM

You can leave the "tell album" line in and change it to "random" or some name that would require you to create an album with that name. I checked it out and it works as advertised.



[ Reply to This | # ]
One way to randomize order of an iPhoto slideshow
Authored by: jDeppen on Mar 07, '09 05:12:08PM

The script works fine in iPhoto '09. I ran it a few times to be sure it was random.

Just make sure you create an empty library, then drag in your photos. Delete all photos in the slideshow if you already created it. I had 2 Events so I merged them to one because it didn't seem to really randomize.
Run the script, sort by title (View -> Sort Photos -> By Title), then just drag all the photos to the newly created slideshow.



[ Reply to This | # ]