iPhoto Applescript help please

Discussion in 'Mac Programming' started by ncboston, Jul 19, 2015.

  1. ncboston, Jul 19, 2015
    Last edited by a moderator: Jul 19, 2015

    ncboston macrumors newbie

    Joined:
    Sep 6, 2012
    #1
    Hello - I am in the process of creating a script to deduce my iPhoto library. I have years and years of photos and I have been consistent with flagging and filing my photos into events. However with every new iPhone or every new update we seem to have built up some duplicates.

    Right now I am trying to create a script and I am stuck on how to check if a photo is flagged or not.

    This is what I have:
    Code:
    [
    if (flag of thisPhoto = 1) then
    
                    display alert "found flagged photo"
    
                end if
    ]
    
    But it is clearly returning an error which is this: "iPhoto got an error: Can’t make flag of photo id 4.294993066E+9 into type reference."

    Any help would be greatly appreciated...or if anyone has good online resource that I could use that would be helpful as well.

    Thank you.
     
  2. kryten2, Jul 19, 2015
    Last edited: Jul 19, 2015

    kryten2 macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #2
    Looking at the dictionary of iPhoto 9.5.1 on Mavericks I see no flag property.
    You might have better luck with the new Photos app on Yosemite.

    Edit : The Find/Filter iPhoto Photos actions in the Automator application both have the option to find photos where Photo is marked as flagged.
     

Share This Page