• 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: How to add keywords to photos in iPhoto?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add keywords to photos in iPhoto?


  • Subject: Re: How to add keywords to photos in iPhoto?
  • From: Dalmazio Brisinda <email@hidden>
  • Date: Sat, 6 Dec 2008 00:30:20 -0600

Interesting.

Thanks to your confirmation that assigning keywords does work, I was able to realized that adding a "delay 2" allowed for the part of my script that assigns existing keyword strings to work right after a successful image import (I didn't mention this earlier because importing works without problems and I didn't think it could affect what came after it -- but now I realize I was wrong. AppleScript is a whole different animal).

It seems that AppleScript + event subsystem doesn't seem to like certain things happening too quickly after one another. Odd. I would have thought timing issues to be handled automatically at a much lower level. Having to add this "delay" seems rather kludgy to me...

Okay, this is good though. Now that you've also confirmed that something is wrong with the 'make new keyword' command in iPhoto (I get the same error), does anyone know of a way to programmatically create keywords prior to attempting to assign them?

Best,
dalmazio



On 5-Dec-08, at 6:55 PM, Mark J. Reed wrote:

This works for me:

tell application "iPhoto"
   assign keyword string "My Tag"
end tell

but if the string "My Tag" doesn't exist as a keyword, it fails
silently.  To check this:

set myTag to "My Tag"
tell application "iPhoto"
	try
		get keyword myTag
	on error
		display dialog "Sorry, keyword '" & myTag & "' doesn't exist"
	end try
	assign keyword string myTag
end tell

I tried creating a new keyword, but I couldn't get it to work:

make new keyword at end of keywords with properties {name: "someName"}

gives me

iPhoto got an error: AppleEvent handler failed.

_______________________________________________ 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: How to add keywords to photos in iPhoto?
      • From: Bill Cheeseman <email@hidden>
References: 
 >How to add keywords to photos in iPhoto? (From: Dalmazio Brisinda <email@hidden>)
 >Re: How to add keywords to photos in iPhoto? (From: "Mark J. Reed" <email@hidden>)
 >Re: How to add keywords to photos in iPhoto? (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: How to add keywords to photos in iPhoto?
  • Next by Date: Re: How to add keywords to photos in iPhoto?
  • Previous by thread: Re: How to add keywords to photos in iPhoto?
  • Next by thread: Re: How to add keywords to photos in iPhoto?
  • Index(es):
    • Date
    • Thread