Edit Image Keywords

Hi - I am new to Applescript and am trying to write a script that will function as a FOlder Action to add specific keywords to images added to certain folders. Here is the script I have for modifying the keywords of a single image. I am getting an error message. ANy help is appreciated.

Thanks!


set this_file to choose file
try
	tell application "Image Events"
		launch
		-- open the image file
		set this_image to open this_file
		-- perform action
		tell this_image
			set value of metadata tag "Keywords" to "Bozeman"
			close
		end tell
		-- save the changes
		save this_image with icon
		-- purge the open image data
		close this_image
	end tell
on error error_message
	display dialog error_message
end try


Model: Powerbook G4
AppleScript: 2.1
Browser: Firefox 2.0.0.4
Operating System: Mac OS X (10.4)

Hi,

from the dictionary of Image Events → metadata tag:

value (item, r/o) : the current setting of the tag

‘r/o’ means read only - setting a value with Image events is not possible - sorry …

D.

You can download and use Keyword Assistant, which is a scriptable iPhoto plugin. I use it from time to time and find it very useful.