🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2536

Find open and close smart quotes

#2536
From: hm24_arul
Date: Mon, 15 Dec 2008 07:36
28 lines
1450 bytes
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
Technical Details
Message-ID: <59b7454c.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,174117860d95f2b3,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: hm24_arul@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Find open and close smart quotes
Message-ID: <59b7454c.-1@webcrossing.la2eafNXanI>
Date: Sun, 14 Dec 2008 23:36:36 -0800
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit