Scripting "Add Link..."

I doubt that’s possible. And I’d use the path to the document instead. And I already explained that adding annotations to a PDF with a script doesn’t screw it up for DT. For more information:

I didn’t ask for justification but for explanation (what does “as a key” mean, what’s the content of “anotherPDF” etc.). If I don’t understand what you’re trying to do (or doing), how do you expect me to give advice?