12 Replies Latest reply on Jun 25, 2014 6:18 AM by Daljonas

    How to make at startup script that fits spread on open

    Daljonas

      Hi there,

      Does anyone know how to make a startup script for InD CS6 that fit spread too screen when document open?

      I've tried this and it works but I've get a dialog that says "Object is not valid":

       

      #targetengine "session"

       

      main();

      function main(){

      var myEventListener = app.eventListeners.add("afterOpen", excuteScript);

      }

       

      function excuteScript(){

      var myD = app.documents[0];

       

      app.layoutWindows[0].zoom(ZoomOptions.FIT_SPREAD);

       

      }