INDESIGN: Updating Links Not Working
INDESIGN: Updating Links Not Working
- Subject: INDESIGN: Updating Links Not Working
- From: Rick Gordon <email@hidden>
- Date: Fri, 02 Sep 2011 14:27:24 -0700
I'm working on this script to add metadata to images in a series of InDesign files. Working on a stub file for a single document, it's al working except that my links are not being updated. Towards the bottom of this script, I tell the item link to update, and receive no error, but the document still shows the links as modified.
If I get properties on a given image link after processing it, I get {edited:false, status:link out of date} as pertinent properties.
What's my problem here?
Rick Gordon
---
set vBookName to "Tiny Homes"
set vBookAcronym to "TH"
set vSectionName to ""
tell application "Adobe InDesign CS5"
set vApp to it
set user interaction level of script preferences to never interact
tell document 1
set vDoc to it
set vFileName to name
set vDocFilePath to POSIX path of (((file path as text) & name as text) as alias)
set vShortName to (characters 5 thru -6 of vFileName) as text
set vSpecificIndex to (characters 1 thru 3 of vFileName) as text
set vSectionIndex to character 1 of vFileName & "00"
if vSectionIndex is "100" then
set vSectionName to "Frontmatter"
else if vSectionIndex is "200" then
set vSectionName to "On Foundations"
else if vSectionIndex is "300" then
set vSectionName to "On Wheels"
else if vSectionIndex is "400" then
set vSectionName to "By Architects"
else if vSectionIndex is "500" then
set vSectionName to "Prefabs & Kits"
else if vSectionIndex is "600" then
set vSectionName to "Earthy Materials"
else if vSectionIndex is "700" then
set vSectionName to "Treehouses"
else if vSectionIndex is "800" then
set vSectionName to "On the Road"
else if vSectionIndex is "800" then
set vSectionName to "On the Water"
else if vSectionIndex is "900" then
set vSectionName to "Backmatter"
end if
set VImageList to (item link of all graphics) as list
repeat with vItem in VImageList
set vImageFilePath to POSIX path of ((file path of vItem) as alias)
set vImageCommand to "exiftool -keywords+=\"" & vBookName & "\" " & ¬
"-keywords+=\"" & vBookAcronym & "\" " & ¬
"-keywords+=\"" & vFileName & "\" " & ¬
"-keywords+=\"" & vShortName & "\" " & ¬
"-keywords+=\"" & vSpecificIndex & "\" " & ¬
"-keywords+=\"" & vSectionIndex & "\" " & ¬
"-keywords+=\"" & vSectionName & "\" \"" & vImageFilePath & "\""
do shell script vImageCommand
tell vItem to update
end repeat
save
close
end tell
end tell
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
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