• 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: Why does this iPhoto applescript fail to produce new albums with photos in them?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does this iPhoto applescript fail to produce new albums with photos in them?


  • Subject: Re: Why does this iPhoto applescript fail to produce new albums with photos in them?
  • From: kai <email@hidden>
  • Date: Thu, 10 Mar 2005 21:20:45 +0000


On Thursday, March 10, 2005, at 08:47 pm, I wrote:

Frankly, I'm not entirely sure if the following will improve matters for you. If it doesn't, then I doubt you'll speed things up significantly with things as they stand. Still, it might be worth a go...

I just noticed on the web archives that the script I included came out as utter gobbledygook. (Please - spare me the "so what's new?" comments!) ;-)


For the benefit of anyone affected, here's a plain text version. (Some long lines may need to be rejoined):

---------

property albumSize : 48 (* modify as required: maximum 48 *)

to getPhotoList()
tell application "iPhoto" to tell (get selection) to try
if item 1's class is album then error
it
on error
tell current application to display dialog "Please select some images first." buttons {"Cancel"} default button 1 with icon 0
end try
end getPhotoList


set photoList to getPhotoList()
set photoCount to (count photoList)

tell application "iPhoto" to repeat with startPhoto from 1 to photoCount by albumSize
tell startPhoto + albumSize - 1 to if it > photoCount then
set endPhoto to photoCount
else
set endPhoto to it
end if
set albumName to "Page " & startPhoto div albumSize + 1
new album name albumName
tell album albumName to repeat with currPhoto in photoList's items startPhoto thru endPhoto
add currPhoto to it
end repeat
end repeat


---------

---
kai

_______________________________________________
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


  • Follow-Ups:
    • Re: Why does this iPhoto applescript fail to produce new albums with photos in them?
      • From: "Andrew T. Lynch" <email@hidden>
References: 
 >Re: Why does this iPhoto applescript fail to produce new albums with photos in them? (From: kai <email@hidden>)

  • Prev by Date: Re: add name/date to picture
  • Next by Date: date calculations
  • Previous by thread: Re: Why does this iPhoto applescript fail to produce new albums with photos in them?
  • Next by thread: Re: Why does this iPhoto applescript fail to produce new albums with photos in them?
  • Index(es):
    • Date
    • Thread