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 the 10.6.x versions (Leopard, Snow Leopard).

iPhoto Portrait & Landscape

Click to download

Every once in awhile, it is nice to sort out 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 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.

iPhoto Trash From Album View

Click to download

Even after nearly 10 years, deleting photos from iPhoto is still difficult, especially when you are simply cruising through an album. Fortunately, Mr. Codeboy has devised a simple solution. When this script is invoked, any selected images in the album will be transferred over to iPhoto's Trash bin. If you change your mind later on, you can always drag them back out into another album.
Tip: If you first create a Smart Album that selects only photos with a 1 star rating, you can easily tag unwanted photos with a single star at any time, thus creating a collection of images for deletion. Every once in a while, go to that album, select all (command-A), and run this script.

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.