Re: More questions about scripting iPhoto
Re: More questions about scripting iPhoto
- Subject: Re: More questions about scripting iPhoto
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 25 Feb 2008 23:19:57 -0500
Minor tweaks to exit the keyword loop when a match is found (shouldn't
matter much); turned the "found none" into a "found this many" and
moved it, since you could have a keyword with no photos.
set desiredTagName to "chase" -- change as desired
tell application "iPhoto"
set desiredTag to false
repeat with tag in keywords
if tag's name is desiredTagName then
set desiredTag to tag
exit repeat
end if
end repeat
if desiredTag is false then
set taggedPhotos to {}
else
set taggedPhotos to every photo whose keywords contains desiredTag
end if
display dialog ("Found " & (count taggedPhotos) as string) & " photos
with keyword '" & desiredTagName & "'"
taggedPhotos
end tell
_______________________________________________
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