Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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:

name:"M4V01346.MP4"
width:640.0
dimensions:{640.0, 480.0}
altitude:0.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"
class:photo
rating:0
title:"M4V01346.MP4"
height:480.0
thumbnail path:"/Users/<username>/Pictures/iPhoto Library/Data/2007/Sep 9, 2007/M4V01346.jpg"
id:4.2949778E+9
latitude:3.40282346638529E+38
comment:""
original path:"/Users/<username>/Pictures/iPhoto Library/Originals/2007/Sep 9
2007/M4V01346.MP4"
longitude:3.40282346638529E+38
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.