Article View: adobe.scripting.indesign
Article #684Re: Need help with Javascript
From: Peter Kahrel
Date: Sun, 08 Mar 2009 10:24
Date: Sun, 08 Mar 2009 10:24
12 lines
929 bytes
929 bytes
In CS2 it's a little more complicated. As X said, you can replace $0.50 to 50� in one pass:
myStories = app.activeDocument.stories.everyItem().getElements();
for (i = 0; i < myStories.length; i++)
if (myStories[i].contents.length == 5)
myStories[i].contents = myStories[i].contents.replace (/\$0\.(\d\d)/, "$1�")
Peter
Technical Details
Message-ID:
<59b825f3.3@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b825f3.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,bf65f0ea9955e42e X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII From: "Peter Kahrel" <kahrel@kahrel.plus.com> Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Need help with Javascript Message-ID: <59b825f3.3@webcrossing.la2eafNXanI> Date: Sun, 8 Mar 2009 03:24:54 -0700 References: <59b825f3.-1@webcrossing.la2eafNXanI> Lines: 10 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit