Mr. CodeBoy




AppleScripts


There are two methods to configure your Mac to easily access and run Applescripts, depending on your version of Mac OS X
This page will help you if your version is earlier than 10.6 (Leopard), and this page shows you how do it in any of the later versions (Leopard, Snow Leopard, Lion, Mavericks).

iPhoto Portrait & Landscape

Click to download

Every once in awhile, it is nice to sort images based on orientation. iPhoto does not have a native method for doing this, so Mr. CodeBoy devised a nifty AppleScript to do the job.

PortORLandKeyword will examine every image in your iPhoto library, and either assign the keyword Portrait or Landscape to every photo, based upon the aspect ratios of the individual images. If a photo already has one of those keywords, it will be skipped, so as not to waste time. Therefore, you can run it anytime you wish without worrying about it chugging through every photo every time.

But wait, you have some square images, you say? No problem. This script will also assign the keyword Square to those. The only drawback at this time is that since the script skips any images already keyworded as Landscape, Portrait, or Square, if you change the orientation of a photo AFTER you have executed the script once, you will have to change the keyword yourself.

You will receive a warning, and the script will quit if you have not already added the appropriate keywords to your iPhoto keyword list. At this time, AppleScript is unable to add keywords to iPhoto; only the user may do that.

The download will result in a zipped file tagged with the file extension zip. Double-clicking the file will expand it into an AppleScript file, which you then place in your Scripts folder for easy access. This works pretty quickly on smaller iPhoto libraries, but be patient when invoking it on the larger collections.

iPhoto Portrait & Landscape II

Click to download

This is the same AppleScript as described above, but it gives you the option of choosing from a list of your albums, instead of going through every photo in your entire collection. Depending upon the size of your photo library, this can greatly speed up the analysis of the photos you are most interested in.

The download will result in a zipped file tagged with the file extension zip. Double-clicking the file will expand it into an AppleScript file, which you then place in your Scripts folder for easy access. This version works very quickly on compact iPhoto albums, but when you select multiple albums, it will process each one individually, so please be patient as the script progresses album by album.

iPhoto Month Finder

Click to download

iPhoto's Search is very versatile, and quite fast. Sometimes, however, you just want all the photos from a certain month, regardless of the year. iPhoto Month Finder will do just that, albeit a bit slowly, especially if you have a large collection of images in your iPhoto Library. When launched, you can choose any single month, and every photo in your library that was made during that month (of any year), will be placed in album with the month's name. You can run this script any time you want to gather more images into the already created folder.

The download will result in a zipped file tagged with the file extension gz. Double-clicking the file will expand it into an AppleScript file, which you then place in your Scripts folder for easy access. This works pretty quickly on smaller iPhoto libraries, but be patient when invoking it on the larger collections.