1 person found this helpful
That looks like a nasty conundrum. Do you get the right value for update link option after you relink? If so, you might be best to relink, get the value, undo the relink, then set the value.
Shane Stanley <firstname.lastname@example.org>
AppleScript Pro Sessions <http://scriptingmatters.com/aspro>
Well, I give you points for creativity! Unfortunately, relink is destructive and overwrites any info with the default (which in CS2 is application settings).
What really kills me is that InDesign has some Sooper Seekrit internal list that only the Links palette knows about. So if you *manually* try and relink the document and then revert it, it automatically relinks against all the paths you've tried since launching it and therefore, the second time all the links show as linked and the process is non-destructive, unlike the "relink" command.
I will think on it some more though. Thanks for your input!
PS: Adobe apparently broke the ability to relink against a string in CS4 from what I can tell. In spite of the fact that the dictionary specifically lists alias or string or string (yes, says or string twice in the dictionary), only alias really seem to work.
set newLinkFolder to "" & path to home folder & "Pictures:"
set newLinkPath to newLinkFolder & name of thisLink
relink thisLink to newLinkPath
display dialog "FAIL!"
relink thisLink to newLinkPath as alias
display dialog "No fail. You'll never see this message!"