Hi,
Below is a script that we use to fix broken links for a specific production.
It works with CS3 but not with CS4.
Doesn’t give any errors but the links aren’t fixed.
Anyone any ideas?
set mainFolder to "TS-Leenbakker:"
tell application "Finder"
set subFolders to every folder of folder mainFolder as alias list
end tell
tell application "Adobe InDesign CS3"
tell document 1
set theLinks to every link whose status is link missing
repeat with i from 1 to count of theLinks
set thelink to item i of theLinks
set theName to name of thelink as Unicode text
repeat with eachFolder in subFolders
set newpath to (eachFolder as Unicode text) & theName
try
relink thelink to newpath
end try
end repeat
end repeat
end tell
beep 2
display dialog "Klaar, bekijk de links."
end tell
Hi Peter,
can I suggest display a dialog on error, may give you some clue!!!
set mainFolder to "TS-Leenbakker:"
tell application "Finder"
set subFolders to every folder of folder mainFolder as alias list
end tell
tell application "Adobe InDesign CS3"
tell document 1
set theLinks to every link whose status is link missing
repeat with i from 1 to count of theLinks
set thelink to item i of theLinks
set theName to name of thelink as Unicode text
repeat with eachFolder in subFolders
set newpath to (eachFolder as Unicode text) & theName
try
relink thelink to newpath
on error theError
display dialog theError
end try
end repeat
end repeat
end tell
beep 2
display dialog "Klaar, bekijk de links."
end tell
Adobe Indesign CS4 got an error: link id 209 of EPS id 208 of rectangle id 213 of page id 190 of spread id 185 of document" NoName-1 doesn’t understand the relink-message/command.
Hi Peter,
if you apply the same on error to the CS3 script is the error message the same? (presuming that the first folder it looks in for the link doesn’t contain it you should get an error)
Thanks,
Nik