Hi Everyone
We are having a problem with InDesign CC. We are trying to use Q2ID to convert Quark 7.5 files to InDesigh CC.
Almost everything working Except the image linking.
Because the Image File Links are broken, Indesign HELPS??? by adding the local HD name to the Link file Path.
Therefore it completely fails when trying to relink.
The path is correct except for the local added part.
So I am trying to use AppleScript to fix the problem and have failed in doing so.
Please look at what I have and point me in the right direction.
Thank you in advance for your help
Oakley
What I have so far:
–I START BY SELECTING AN IMAGE BOX THEN RUN THIS SCRIPT
–IT FINDS THE IMAGE FILE BUT I DON’T KNOW HOW TO GET INDESIGN TO UPDATE IT.
tell application “Adobe InDesign CC”
set imagepath to file path of item link of item 1 of all graphics of selection
set linkName to name of item link of item 1 of all graphics of selection
--This does not work to get scale or positioning
--I thought I might have to specify this to keep these parameters
set theScale to properties of item link of item 1 of all graphics of selection
end tell
display dialog “Name of the link is <” & linkName & “>” buttons {“Cancel”, “OK”} default button “OK”
–set imagepath to file path of item link of item 1 of all graphics of rectangle 1
–INDESIGN ADDs THE LOCAL HD TO THE PATH NAME THEREFORE IT CAN NEVER UPDATE
–IN MY CASE IT ADDS “Macintosh HD:”
–THIS STRIPS OFF THE INITIAL PATH NAME ADDED BY INDESIGN
if imagepath starts with “Macintosh HD:” then
–display dialog “Local HD Crap” buttons {“Cancel”, “OK”} default button “OK”
set CharCount to number of characters in imagepath
set CleanName to characters 14 thru CharCount of imagepath as string
--display dialog "<" & CleanName & ">" buttons {"Cancel", "OK"} default button "OK"
else
set CleanName to imagepath as string
end if
–THIS VARIFIES THE EXISTANCE OF THE IMAGE FILE it works every time
–tell application “Adobe Photoshop CC”
– open file CleanName
–end tell
–i got these examples from MacScripter
tell application “Adobe InDesign CC”
--THIS DOES NOT WORK
--relink link "Name of Link" to (pathName & "NewFile.ext")
relink link linkName to alias CleanName
--THIS DOES NOW WORK EITHER
relink link linkName to CleanName
--THIS DOES NOT WORK EITHER EITHER
try
update link linkName --This still uses the bad Path
end try
end tell
–HELP – HOW DO I FIX THIS