set CAPTION_TAG to "Caption/Abstract" (* It would be nice to check if it's running or not first... (but in use, the issue is avoided by using a quicksilver trigger limited to the scope of Aperture anyway). *) tell application "Aperture" set images to the selection repeat with image in images if class of image is image version and image is picked then set currentCaption to "" repeat with tag in (every IPTC tag of image whose name is CAPTION_TAG) set currentCaption to currentCaption & value of tag end repeat try set reply to display dialog "Enter caption for " & name of image & ": " default answer currentCaption buttons {"Ok", "Skip", "Cancel"} default button "Ok" cancel button "Skip" with title "Edit caption" with icon note if button returned of reply is "Ok" then set currentCaption to text returned of reply if currentCaption is not "" then tell image make IPTC tag with properties {name:CAPTION_TAG, value:currentCaption} end tell end if end if if button returned of reply is "Cancel" then exit repeat end if on error -- skip end try end if end repeat end tell