5 Replies Latest reply on Jul 23, 2014 5:51 AM by Johnwhite

    Why this script unfunction?

    Johnwhite Level 1

      Hi, everyone

       

      I add an  UndoModes.FAST_ENTIRE_SCRIPT to the script, but unfunction, can you fix it?

       

      app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Indent Paragraphs"); 

      function main(){

      var curSel = app.selection[0]; 
      for ( var i = 1; i < app.documents.length; i++) { 
          var nextDoc = app.documents[i]; 
          if (!curSel) { alert( "Nothing selected!" ); exit(); } 
          curSel.duplicate( nextDoc.masterSpreads[0] ); 
      }
      }

       

      John