Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Selecting multiple photos in iPhoto
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selecting multiple photos in iPhoto

On Tue, 22 Mar 2005 00:26:20 -0600, Lou Miranda wrote:

After reading through a number of previous posts (dating back to 2003) and trying a bunch of examples myself, I still can't select multiple photos in iPhoto 5. I'm importing photos into an existing album, and I want to select only the photos I just imported.

I can select one photo:
1. select (photos whose name is "MyPhoto23")

I can select a whole album full of photos:
2. select (every photo of album myAlbum)

But I can't select a subset of an album. (I am an AppleScript newbie, however.) None of the following work:

3. select (every photo in album myAlbum whose name is in newFilesTitles)

4. set photosToSelect to {}
repeat with currentPhoto in (every photo of album myAlbum)
if (currentPhoto's name as string) is in newFilesTitles then
set the end of photosToSelect to currentPhoto
display  dialog currentPhoto's name
end if
end repeat
select (photosToSelect)

5. set photosToSelect to (every photo of album myAlbum)
  select (photosToSelect)

6. set photosToSelect to (every photo of album myAlbum)
  select (every photo in list photosToSelect)

To my newbie eyes, #2 and #5 or #6 should be the same thing, but only #2 works. So, how do I select a range of photos that match the photo names that I have in a list?

AppleScript newbie or not, Lou - I don't think there's much wrong with your sense of logic. It's just a pity that iPhoto doesn't seem to share it. ;-)

(I'm currently using iPhoto 4 - but the behaviour here appears to be fairly consistent with your own experience.)

The first thing that strikes me is that iPhoto's filtering capabilities fall a little short of the mark. While it's possible to use a construct like < photos whose name starts with "some string" >, the < photos whose name is in {"some", "list"} > form fails. Since this type of syntax works in other applications, iPhoto's AS filters are somewhat less than complete by comparison.

Moreover, the fact that iPhoto seems incapable of simply selecting items (especially from a list of references that it created itself) looks rather like buggy behaviour to me. It precludes even the use of a repeat loop to build a list for selection. Again, this sort of action is perfectly possible in other applications - so it's a bit disappointing from an app version as high as 4/5.

Let's hope that these issues can be resolved in the next upgrade. In the meantime, I wonder if we can come up with a workaround...

One thought that occurs to me is the possibility of using id numbers as a means of filtering. For example, given that your latest list of photo names is attributed to the variable 'newFilesTitles' (as indicated above), you might try something like the following line (watch for wraps):


tell application "iPhoto" to tell current album to select (photos whose id >= (get id of first photo whose name is item 1 of newFilesTitles))



Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.