3 Replies Latest reply on Sep 19, 2011 10:45 AM by menzel7281

    Events starting up extendscript

    menzel7281

      Given the following script on InDesign CS5.5 (executed from the startup script folder):

       

      #targetengine "session"

      function fireAfterPrint(myEvent){
      alert( app.activeDocument.label);
      }

      app.addEventListener("afterPrint", fireAfterPrint, false);

       

      After printing, extendscript opens up with a yellow line on at the function declaration. It seems like a breakpoint, because I can hit play and the alert pops up.

       

      This breakpoint behavior happens after every print, whether Extendscript is open or not.

       

      This is obviously not the behavior I desire. Is there anyway to have the event go off without breaking?

       

      I tried adding app.scriptPreferences.userInteractionLevel = 1699640946; after the #targetengine statement with no change.