• 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 Scripting Errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPhoto Scripting Errors


  • Subject: iPhoto Scripting Errors
  • From: Martin Fuhrer <email@hidden>
  • Date: Sat, 25 Nov 2006 17:51:33 -0700

I have an Applescript that manipulates albums in iPhoto, and requires information about album types. Conveniently, the "album" Applescript keyword for iPhoto has a "type" property, which determines whether the album is a "regular album, smart album, book album, slideshow album, etc." For the most part, end users are able to run my Applescript with no problem. However, a small group of users are getting errors. To investigate these errors, I have had a few affected users run the following test scripts in Script Editor:

--------------------------
-- AlbumTest1.scpt --
--------------------------

try
tell application "iPhoto"
set albumList to id of every album
repeat with albumId in albumList
set albumType to type of album id albumId
end repeat
end tell
on error errorText number errorNumber
tell application "iPhoto" to set myVersion to version
set myString to "AlbumTest1: iPhoto v" & myVersion & " " & errorText & " " & errorNumber
end try


--------------------------
-- AlbumTest2.scpt --
--------------------------

try
tell application "iPhoto"
repeat with n from 1 to number of albums
set albumType to type of album n
end repeat
end tell
on error errorText number errorNumber
tell application "iPhoto" to set myVersion to version
set myString to "AlbumTest2: iPhoto v" & myVersion & " " & errorText & " " & errorNumber & " (n is: " & n & ")"
end try


--------------------------

Both these scripts execute fine for me, and I end up with the text "trash album" in the Result pane, as this is the type of the last album queried by the repeat loop. However, the affected users typically report the following results:

AlbumTest1.scpt:
"AlbumTest1: iPhoto v6.0.5 iPhoto got an error: Can't make id of every album into type reference. -1700"


AlbumTest2.scpt:
"AlbumTest2: iPhoto v6.0.5 iPhoto got an error: Can't make type of album 1 into type reference. -1700 (n is: 1)"


Initially, I suspected that perhaps some users were running an older Mac system with an old version of Applescript, but the last person to report these errors is running OS X 10.4.8 on an Intel MacBook.

Does anyone have any insights into the cause of these errors, and why they appear on some systems and not on others?

Thanks!

Martin



_______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Apple Events from Windoze?
  • Next by Date: Re: Apple Events from Windoze?
  • Previous by thread: Re: Apple Events from Windoze?
  • Next by thread: [OT] recombine resource and data fork
  • Index(es):
    • Date
    • Thread