Article View: adobe.scripting.indesign
Article #14823Re: JS beginners help
From: Peter_Kahrel
Date: Tue, 13 Jan 2004 13:56
Date: Tue, 13 Jan 2004 13:56
16 lines
1313 bytes
1313 bytes
Roy,
If you want to find and replace in the whole document, then just this line will do:
app.activeDocument.search("roy",false,false,"ROY");
If you want to find and replace in just one story, you select that story and you need these two lines:
myStory=app.selection[0].parentStory;
myStory.search("roy",false,false,"ROY");
which by the way could also be written as one line: app.selection[0].parentStory.search("roy",false,false,"ROY")
The meaning of "false" you can find in the scripting guide: look under 'story', then go to the methods, and on p. 1001 you'll find the answer.
Peter
Technical Details
Message-ID:
<2ccf45cf.9@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.eunet.no!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccf45cf.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,613db9f5b5ffc527 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-13 06:07:46 PST From: Peter_Kahrel@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!news.eunet.no!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: JS beginners help Message-ID: <2ccf45cf.9@webx.la2eafNXanI> Date: Tue, 13 Jan 2004 05:56:26 -0800 References: <2ccf45cf.-1@webx.la2eafNXanI> Lines: 20 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit