0 Replies Latest reply on Jan 2, 2013 6:10 AM by shilpa25

    stop export to PDF after alert message;

    shilpa25 Level 1

      Hi forum,

       

      my task is:

       

       

      If i get alert message while pressing. CMD+E in indesign..... the alert message will display and say "your document has some problem"..

      and there after conforming alert message, the export to print should exit; (if the document doesn't get alert message, then export to pdf should work);

       

      so.. i assigned exit(); command between the something to find and alert and then export to pdf programme...

       

      var mydoc = app.activeDocument;

      var myerror=mydoc.stories.everyItem().paragraphs.everyItem().characters.everyItem().getElemen ts();

      for (i=0; i<myerrors.length; i++)

          myerror = myerrors[i];

           if (myerror.fillColor.colorValue.join() == "0,0,0,0"){

                   alert("doc has some problem please fix:");

      }

       

      exit ();

       

      var myPresets = app.pdfExportPresets.everyItem().name;

      myPresets.unshift("- Select Preset - ");

      var myWin = new Window('dialog', 'PDF Export Presets');

       

      thanks..

      shil....