Change Caption
Current version: 01
Built on: Aperture 1.5.2
This AppleScript operates on the current selection.
Built on: Aperture 1.5.2
This AppleScript operates on the current selection.
An AppleScript to quickly change the caption of the selected images. Much easier than the Batch Change window. It has the option to replace any existing caption or to append to the existing comment. You can change what is put between old & new caption by changing the p_appendSep property. The default is a carriage return.
Download
-- --------------------------------------------------------------------------------------------
property p_field : "Caption/Abstract"
property p_appendSep : return
-- --------------------------------------------------------------------------------------------
on run
tell application "Aperture"
copy selection to m_theSel
try
set m_initVal to value of IPTC tag p_field of (item 1 of m_theSel)
on error
set m_initVal to ""
end try
tell AppleScript
set m_theOut to display dialog ("Enter a " & p_field) default answer m_initVal buttons {"Replace", "Append", "Cancel"} default button 1
end tell
repeat with m_curImg in m_theSel
tell m_curImg
if button returned of m_theOut is "Replace" then
set m_newVal to (text returned of m_theOut)
else
try
set m_initVal to ((value of IPTC tag p_field) & p_appendSep) as string
on error
set m_initVal to ""
end try
set m_newVal to (m_initVal & (text returned of m_theOut))
end if
make new IPTC tag with properties {name:p_field, value:m_newVal}
end tell
end repeat
end tell
end run