• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iPhoto album scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhoto album scripting


  • Subject: Re: iPhoto album scripting
  • From: nick weldin <email@hidden>
  • Date: Wed, 17 Oct 2007 10:12:10 +0100

Title: Re: iPhoto album scripting
Thats great thanks -I have code for dealing with a selection of photos from other iPhoto examples I found - I needed this to deal with someone selecting an album rather than a photo or photos - so I should have it covered now.

Thanks again

Nick

On 2007-16-10, at 12:28, nick weldin wrote:

It does break though if someone has 2 albums selected in the iPhoto window, so it would be great if there was a way to work with the values returned by get selection (if 2 albums are selected that returns the id of each of them and I could work through them both).

Hi Nick,

The following works -- but watch out because sometimes the selection can be a plurality of 'photos' and that's a different can of wormsŠ

tell application "iPhoto"
        set res to {}
        set alist to get selection
        repeat with alb from 1 to count of alist
                tell album alb
                        repeat with p in photos
                                --set end of res to {title of p, width of p, height of p}
                                set end of res to properties of p
                        end repeat
                end tell
        end repeat
        res
end tell

Philip Aker
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: iPhoto album scripting (From: nick weldin <email@hidden>)
 >Re: iPhoto album scripting (From: Philip Aker <email@hidden>)

  • Prev by Date: Compress PDF file
  • Next by Date: Re: Compress PDF file
  • Previous by thread: Re: iPhoto album scripting
  • Next by thread: Problems with Mac to PC names conversion script
  • Index(es):
    • Date
    • Thread