Aperture

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

Goodies

  • 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.

Oddities

  • 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 responses to “Aperture 1.5 AppleScript”

  1. Brett Avatar
    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. Adam Tow Avatar

    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 Avatar
    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 comment

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

Adam, here

Welcome to tow.com, my home on the internet since 1995. I’m an indie software artist and creator of apps such as MixEffect, MsgFiler, AlbumFiler, Wipe My Screen, and more. I’m also the producer and co-director of Autumn Gem. Enjoy your visit here!

Let’s connect