In CS5, it might be technically possible to do c), but I would not advise it.
a) is doable, but you should start with b) and then you can run the script in an event handler once it's working correctly.
To run it in an event handler you'd make a startup script with a persistent engine which adds an event listener which runs your function.
I'm comparing the length of doc.crossReferenceSources.length against doc.hyperlinkTextDestinations.length, and if they're not equal, then that hints at a dead reference in my document, so i'm trying to then cycle over the crossReferenceSource's (there's one more than hyperlinktextdestination's), but all crossreferencesource's seem to be have isValid set to true even though the destination is gone, and the cross-reference tab in id shows a dead cross reference.
interesting. i've been cycling over doc.hyperlinks, and even though all have .isValid == true on them all, the dead links have destination == null. surely that's a bug as any hyperlink that has hyperlink.destination == null is not valid.
1 person found this helpful
No. It's not a bug.
isValid doesn't tell you a hyperlink will work. Rather it tells you whether the specifier points to a hyperlink object (which it does).