11 Replies Latest reply on Feb 19, 2009 5:46 AM by Harbs.

    [JS CS4] Why is this If Else test not working?

    Skempy Level 1
      The following script pops up an alert showing me the results of a live Preflight running in a document.

      var myPreflight = app.preflightProcesses[0];
      var myReport = myPreflight.processResults;

      If there are no errors then the alert says "None".

      My test below doesn't work and gives the "Errors found" alert even if there are no Preflight errors in the document.

      if (myReport == "None")
      alert ("No errors found");
      alert ("Errors found");

      Can anyone explain where I am going wrong.