• 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: AppleScript-Users Digest, Vol 4, Issue 504
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-Users Digest, Vol 4, Issue 504


  • Subject: Re: AppleScript-Users Digest, Vol 4, Issue 504
  • From: "Mr. George" <email@hidden>
  • Date: Wed, 17 Oct 2007 11:52:07 -0700 (PDT)

Hi Nick,

You can try this code. It requests the users to select the album from a list of
albums, eliminating the possibility of having two selections causing an error,
or false result. This scrip could be made to handle multiple selections if
needed.

tell application "iPhoto"
	--get name of all albums
	set all_albums to name of every album
	--user picks which album to choose
	choose from list all_albums --with multiple selections allowed
	set choice_album to result
	set choice_album to item 1 of choice_album
	set num_of_photos to count photos in choice_album
end tell



George

>
> Thanks for that.
>
> current album works for me too - I hadn't thought of that.
>
> 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).
>
> Cheers
>
> Nick
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
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

  • Prev by Date: Re: [aspro-talk] ActionScript called by AppleScript in ImageReady CS2 fail close window
  • Next by Date: Re: AppleScript 2.0?
  • Previous by thread: Re: AppleScript-Users Digest, Vol 4, Issue 504
  • Next by thread: Compress PDF file
  • Index(es):
    • Date
    • Thread