Aperture 1.5 AppleScript


This post will detail some of the new AppleScript goodies and oddities of Aperture 1.5.


  • Selection: I can’t stress how much I love this feature. It will certainly make development of new features much faster now that I have access to the currently selected images.


  • Selection: If you select a stack of images, the selection property will return all images in the stack. There no stack property in Aperture yet. I expect something like that to come in version 2.0.
  • Sublocation becomes SubLocation: The IPTC tag name has gone from Sublocation to SubLocation with a capital L. In Annoture 0.9.3, iView 2.6.4 and Aperture 1.5, this caused problems syncing the SubLocation IPTC tag.
  • Caption becomes Caption/Abstract: The IPTC tag name has gone from Caption to Caption/Abstract. This caused problems syncing the Description IPTC tag.
  • Keywords property: Not sure if this is working properly, but I’m unable to access the keywords property for the selected image

    tell application “Aperture”
    set theImage to first item of selection
    set theKeywords to keywords of theImage
    end tell

    This doesn’t return a proper keywords list for me. Boo hoo.

3 thoughts on “Aperture 1.5 AppleScript

  1. Brett

    You can access an image’s keywords with some very, very weird scripting:

    tell application “Aperture”

    set theSel to selection
    set numSel to count of theSel

    repeat with ctr from 1 to numSel
    set curVersion to (contents of item ctr of theSel)

    set numKeys to count of keywords of curVersion

    repeat with ctrKey from 1 to numKeys
    set curKey to (name of (keyword ctrKey of curVersion))
    log “Current keyword:”
    log curKey

    end repeat
    end repeat
    end tell

    I don’t know why this works and more normal constructs fail, but it’s something.

    Is there any way to add a keyword via AppleScript?

  2. I figured it out the other day. You have to tell the image to make a new keyword with properties. For instance:

    tell theImage
    make keyword with properties {name:"Women"}
    end tell

  3. Kris Swanson

    does anyone know if there any way to create a new project with apple script

    something like

    tell application “Aperture”
    make new project with properties{name:”Project Name”}
    end tell

    this doesn’t work

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: