1 Reply Latest reply on Dec 31, 2012 3:35 AM by Pooja_IDDev

    Problem with Event beforeOpen and beforeClose

    Urico_

      Hi,

      I've a problem with the events with InDesign Server.

       

      I need to know the filename document throw the event beforeOpen or beforeClose.

       

      How can I do it?

       

      Thanks

        • 1. Re: Problem with Event beforeOpen and beforeClose
          Pooja_IDDev Level 1

          #targetengine "session"

          main();

          function main(){

              var myApplicationEventListener = app.eventListeners.add("beforeClose",myEventInfo);

          }

           

           

          function myEventInfo(myEvent){

              var docName = app.documents.item(0);  

              var myString = "Current Target:" + myEvent.currentTarget.name + "Document Name" + docName;

              alert(myString);

          }