🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17979

searching stories in InDesign

#17979
From: John Darnell
Date: Thu, 01 May 2003 22:00
26 lines
1747 bytes
Ole:

I'm studying your script and its giving me pretty much what I need (thank you). I'm having trouble understanding the search command, however.

On my own I wrote a quickie script that looked like this

...
tell text frame 1
set mystory to parent story
tell mystory
set myresult to search true for "XYZ"
return myresult
end tell
end tell
...

in the results window I got this:

text from character 11 to 14 of story id 132 of document "ABC" of application "InDesign"

In your script you seem to pull coordinates out of the search results with lines like this:

set mystartindex to (index of character -1 of mystartitem) + 1
set myendindex to (index of character 1 of myenditem) - 1

I'm having trouble making the transition from those statements to actual range values I can use in a script. Can you please help? If the search command is explained in detail somewhere else, I would be happy to look at it if you will point me to it.
Technical Details
Message-ID: <1de8f611.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,3864f515c2ca8506,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-05-01 15:08:06 PST
From: "John Darnell" <John.Darnell@Walsworth.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: searching stories in InDesign
Message-ID: <1de8f611.-1@WebX.la2eafNXanI>
Date: Thu, 1 May 2003 15:00:27 -0700
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit