Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to find away to create an automator action that puts photos into iPhoto but also adds the hidden tag to them. I've started with the folder action template because I'd like to save the files there and have automator kick off a series of steps that ends with the original image being hidden once I've had the enhancement, re-size, etc steps fire off. The only step I can't figure out is applying the hidden image attribute.

share|improve this question
up vote 1 down vote accepted

AppleScript does not seem to presently have a method for setting a given photo as hidden. If you make a selection in iPhoto, then open the AppleScript Editor and paste this code and run it:

tell application "iPhoto"
    set theSel to selection
    get properties of item 1 of theSel
end tell

You'll see that there is no "hidden: true/false" property. Here is an example of the details found on an item that I hid in iPhoto to see what the available properties are:

dimensions:{640.0, 480.0}
image filename:"M4V01346_3.jpg"
image path:"/Users/<username>/Pictures/iPhoto Library/Modified/2007/Sep 9, 2007/M4V01346_3.jpg"
date:date "Saturday
October 6
2007 11:16:40 AM"
thumbnail path:"/Users/<username>/Pictures/iPhoto Library/Data/2007/Sep 9, 2007/M4V01346.jpg"
original path:"/Users/<username>/Pictures/iPhoto Library/Originals/2007/Sep 9
thumbnail filename:"M4V01346.jpg"

My advice is to create an album in iPhoto called something like "Hidden" and then in your Automator workflow add the photos you wish to be hidden to that album so you know to manually process them easier.

Alternatively, you could set the comment of a photo to include some tag like "hidden" or "to hide" and then create a smart album with that condition. When your photos are processed by the computer, all photos that still need to be hidden will show up in that smart album which you can process and then blank out the comment. However, manipulating the comment would require AppleScript in your Automator Workflow. If you want to use that method, then add the Run AppleScript task into the workflow, and then paste this under the comment (* Your script goes here *):

tell application "iPhoto"
    set taggingText to "to hide" --Change this to your desired special word or phrase
    repeat with anPhoto in input
        tell anPhoto
            set anComment to comment of anPhoto
            set comment of anPhoto to anComment & ", " & taggingText
        end tell
    end repeat
end tell
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .