/ Id-Extras Forum / AfterOpen Script / Reply To: AfterOpen Script

#6325
Ariel
Participant

This seems to work for me, when an existing document is opened. It shows the number of pages in the document. I changed the name of the #targetengine, though, to make it persistent.

Code:
#targetengine MyOpenEvent

app.addEventListener(‘afterOpen’, myOpenFunction);

function myOpenFunction(myEvent){
if(myEvent.target instanceof Document){
alert(myEvent.target.pages.length);
}
}

Does that help?
Ariel