Article View: adobe.scripting.indesign
Article #947JS how to get whole content of paragraph of found text (CS4)
From: erkki_pennanen
Date: Thu, 26 Feb 2009 13:20
Date: Thu, 26 Feb 2009 13:20
23 lines
1292 bytes
1292 bytes
Hi,
Can you tell how to get the content of whole paragraph of found text? I�ll get the content of whole story. How to define paragraph?
// Sample data in InDesign
// A100 (tab) 1234 (tab) 5678 (ret)
// B100 (tab) 1234 (tab) 5678 (ret)
// C100 (tab) 1234 (tab) 5678 (ret)
app.findTextPreferences = null;
app.findTextPreferences.findWhat = "B100";
myFound = app.activeDocument.findText();
myFound[0].select();
myFoundText = app.selection[0].contents // shows content of selected item
alert ("selection is: " + myFoundText)
myFoundText = app.selection[0].parent.contents // shows content of whole story, but only the content of parapgraph of found item?
alert ("content is: " + myFoundText)
regards
Erkki
Technical Details
Message-ID:
<59b80e5c.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,1a9a129c0161ffc2,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII From: erkki_pennanen@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: JS how to get whole content of paragraph of found text (CS4) Message-ID: <59b80e5c.-1@webcrossing.la2eafNXanI> Date: Thu, 26 Feb 2009 05:20:56 -0800 Lines: 26 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit