• 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
iPhoto album scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPhoto album scripting


  • Subject: iPhoto album scripting
  • From: nick weldin <email@hidden>
  • Date: Mon, 15 Oct 2007 22:13:37 +0100

I am trying to get a list of the photos in an iPhoto album.

I have a script that builds a list of albums and asks the user to select the album they want, and this works fine, but I want one that takes the currently selected album in iphoto and returns a list of the photos.

It is giving me a type error and I cant work out what to do to get it to work.

I have stripped it right back to

tell application "iPhoto"
   set this_album to get selection
end tell

which produces
{album id 4.294968078E+9 of application "iPhoto"}

in the bottom window, but as soon as I add anything to use this reference, like this

tell application "iPhoto"
   set this_album to get selection
   set num_of_photos to count photos in this_album
end tell

 I get the error

"iPhoto got an error: Can't make album {album id 4.294968078E+9} into type reference"

I can't find any reference to coercing this into a usable form online, or in the archives, any help gratefully received

Cheers

Nick Weldin
_______________________________________________
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
  • Follow-Ups:
    • Re: iPhoto album scripting
      • From: Philip Aker <email@hidden>
  • Prev by Date: Re: Scripting Image Capture
  • Next by Date: Re: Scripting Image Capture
  • Previous by thread: Re: Scripting Image Capture
  • Next by thread: Re: iPhoto album scripting
  • Index(es):
    • Date
    • Thread