3 Replies Latest reply on Dec 16, 2008 7:51 PM by csm_phil

    Find open and close smart quotes

    hm_arul Level 1
      Dear scripter,

      Here I am trying find whether all the open double smart quotes(") are closed with close double smart quotes("). Here is my small work to find how many open and close quotes.

      myopenqu=app.activeDocument.search("^{", false, false, "^{");
      myclosequ=app.activeDocument.search("^}", false, false, "^}");
      myopenqulength = myopenqu.length;
      myclosequlength = myclosequ.length;
      if(myopenqulength!=myclosequlength)
      {
      alert("Quotes not matched\n"+ myopenqulength +" Open quotes found\n" + myclosequlength +" Close quotes found")
      }

      It works well, the script just alert if I have 25 open quotes and 23 close quotes

      Quotes not matched
      25 Open quotes found
      23 close quotes found

      Now I want to find the quote set where the 24,25th set close quotes are missing?

      Is there any way to find the misisng quotes

      Thanks in advance

      regards
      a r u l
      vpublish.net