Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie question - add Keywords to photos



Hi _ I am trying to write a script that will add specified keywords to a
photo.  My plan is to use it as a Folder Action so when images are added to
a specific folder, certain keywords are automatically added.

I am currently getting the following error

NSReceiverEvaluationScriptError: 4

Here is the script I wrote to add the keyword

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


Thanks so much!


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.