Sort iPhoto album images by forward date

Nov 21, '05 06:49:00AM

Contributed by: leenoble_uk

It bugs me that when you sort photos by date in iPhoto, they are arranged so that the latest photo is first. Well, when I'm watching a slideshow of a day out or a holiday, I kind of want to see the photos in chronological order, call me fussy. This may well have been fixed in iPhoto '04 or since, but I'm still on version 2.

I don't want to change the date or time of the photos, since I think the correct date is rather important sometimes, and manually re-arranging them into the correct order takes too long.

So last night, I finally whipped up this AppleScript which first sorts the photos into date order, then flicks over to manual ordering, and re-imports all the photos in the reverse order. It takes a while to run on my machine, but then, it is nearly four years old now and iPhoto 2 was never a speed demon anyway.

It might also be possible to speed it up by creating a new album with the correct ordering and deleting the old one, but I leave this as an exercise to the reader. Be aware that the script requires UI Scripting to be enabled (Universal Access -> Enable Access for Assistive Devices). To sort an album, just open (select) the album at the organise tab, and run the script either from AppleScript directly, or save it in your user's ~/Library/Scripts folder.

[robg adds: Read on for my take on photo sorting in iPhoto, and how I modifed the script to work with the latest version of iPhoto...

Unfortuantely, sorting in the latest iPhoto is still somewhat odd, because there's only a global-level "show newest photos as the top" setting. In my case, I view by film roll and want the newest photos at the top. But when sorted in that manner, then the images within each album are also sorted "backwards." Thankfully, Lee Noble's script can be easily modified to work with the latest iPhoto -- which I have done in the linked version above (assuming most people here are using the latest version).

I have, however, commented the source to indicate the required changes to make it functional with older versions of iPhoto. Basically, at some version in the past, iPhoto changed the current View -> Sort Photos menu item into View -> Arrange Photos. If your version has the Arrange Photos menu item, you'll have to edit the script as noted to make it work for you.

I saved the finished script in an iPhoto folder in my user's Library -> Scripts folder, and just pick it from the Scripts menu when I want to run it. It's no speed demon (about one second per image in the selected album; revised faster scripts welcomed!), but it works, and works well. As with anything potentially destructive, having a current backup is always a good idea.]

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20051114073155729