Article View: adobe.scripting.indesign
Article #1181ID CS3 FindChange Paragraph Style - please help
From: GraemeS
Date: Thu, 19 Feb 2009 02:42
Date: Thu, 19 Feb 2009 02:42
24 lines
2242 bytes
2242 bytes
Hello,
I'm using InDesign CS3 on Mac.
We use the FindChange scripts quite a bit. (JSFindChangeList.txt) We've modified and added many lines to this script and works really well.
I am however, attempting to modify a sample script to find some text in the document and change it to a Paragraph Style.
We do perform this task using the Find/Change panel, find blahblah, and change it so it applies a particular Paragraph Style.
I'd like to have this one one of our scripts we run to make life much easier, and quicker.
I'm trying to search for an internal code word that we use to apply a Paragraph style to, using a script, and maybe I'm doing something wrong, but the error tells me it doesn't like the word 'Paragraph'
The example/sample line I am trying to modify to suit my own need is:
//More complex example:
//text {findWhat:"^9^9.^9^9"} {appliedCharacterStyle:"price"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find $10.00 to $99.99 and apply the character style "price".
I am trying to alter this line, to look for the word 'section_style', and apply the Paragraph Style we have called 'Section'.
I have got this, but it doesn't work:
text {findWhat:"section_style"} {appliedParagraphStyle:"Section"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find section_style and apply the paragraph style Section.
As I said, the error tells me it's the word Paragraph. I've done some searching, but cannot find an example anywhere where a script will find some text, and apply a Paragraph style to it.
Please help me if you can.
Many thanks in advance.
Graeme.
Technical Details
Message-ID:
<59b7fae5.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,fad635109a00016d,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: GraemeS@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: ID CS3 FindChange Paragraph Style - please help Message-ID: <59b7fae5.-1@webcrossing.la2eafNXanI> Date: Wed, 18 Feb 2009 18:42:19 -0800 Lines: 39 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit