Article View: adobe.scripting.indesign
Article #20524Re: Insert Character in middle of selection
From: Alan Stearns
Date: Tue, 09 Jul 2002 00:30
Date: Tue, 09 Jul 2002 00:30
5 lines
1482 bytes
1482 bytes
myFoundItems is a list of text references. The repeat loop goes through this list backwards, starting with the last item. You need to go through the list backwards because when you add the spaces, you'd invalidate all of the downstream text references (they're index-based, so each space added would make downstream references off by one). On the insertion point issue - it looks to me like you could use either "insertion point -5" or "insertion point 5" The first one starts with the last insertion point (after the last character) and counts backwards. The second one starts with the first insertion point and counts forwards (as Shane noted). With an eight-character string, they're exactly the same.
Technical Details
Message-ID:
<ef98891.2@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!supernews.com!newspump.sol.net!news.maxwell.syr.edu!newsfeed.sovam.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef98891.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,943e1fd1b0f09137 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-07-08 17:40:16 PST From: "Alan Stearns" <astearns@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!supernews.com!newspump.sol.net!news.maxwell.syr.edu!newsfeed.sovam.com!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Insert Character in middle of selection Message-ID: <ef98891.2@WebX.aaQKaf7vad4> Date: Mon, 8 Jul 2002 17:30:12 -0700 References: <ef98891.-1@WebX.aaQKaf7vad4> Lines: 14 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit