Article View: adobe.scripting.indesign
Article #8575textCleanUp.vbs remove character
From: Ben_Mathews
Date: Wed, 11 Oct 2006 16:41
Date: Wed, 11 Oct 2006 16:41
20 lines
1746 bytes
1746 bytes
Can anyone help me with the text cleanup vbs script in ID CS2 using Windows XP?
I have a text file imported into ID CS2 that has characters ("[" and "]") to tell the script what paragraph style to use. Here is a sample of the text:
WOW! WHAT A BALCONY!][Great French Quarter location! Has 2bdrm 2ba. 1170 sq ft liv. All appliances and w/d remain. Must see! 535 St. Philip $549K Warren Backer 494-9159
833 CONGRESS ST IN BYWATER][3bd/2ba Victorian w/1412 sqft, restored antique spiral staircase to loft, master has deck, lots storage. $249K. Cynthia 504-914-5722
After applying the paragraph style I want to delete the special characters. This works well:
{findText:"]"} {changeText:"]^p"} once Find all instances of ] and add a return after them.
{findText:"["} {changeText:"["} {appliedParagraphStyle:"Body Text"} once Format Body Text
{findText:"]"} {changeText:"]"} {appliedParagraphStyle:"Caption"} once Format Caption
When I ad the lines to delete the special characters The scripts never stops running, repeatedly telling me the find/replace has run 100 times. It also applies the caption style to everything.
What am I doing wrong?
Thanks for the help!
Ben
Technical Details
Message-ID:
<3bc1f06d.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,af3ab86490b28ad2 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Ben_Mathews@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: textCleanUp.vbs remove character Message-ID: <3bc1f06d.-1@webcrossing.la2eafNXanI> Date: Wed, 11 Oct 2006 09:41:38 -0700 Lines: 33 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news1.google.com!news.germany.com!news.ecp.fr!news.stben.net!webcrossing