I'm creating a pdf named "ABC.pdf"....
var otherDoc = app.openDoc("DEF.pdf", this);
And, if file doesn't exist. false....
var otherDoc = app.openDoc("GHI.pdf", this);
I do not understand how to write this divergence order.
Would you teach who it is?
It's not that easy... First of all, the files you're trying to open have to be disclosed. Is that the case?
Also, you can't use openDoc in the Doc Open event of another document, as is specfied in the JS API Reference.
What you can do, though, is place the code somewhere similar, like in the Page Open action of the first page. Of course, then you'll need to make sure that it doesn't get launched each time someone scrolls to that page.
openDoc itself can either return null or throw an Exception if the file doesn't exist (or exists but is not not disclosed), so you will need to account for both possibilities.