Article View: adobe.scripting.indesign
Article #20461Re: Insert Character in middle of selection
From: Jay Fraser
Date: Thu, 11 Jul 2002 23:00
Date: Thu, 11 Jul 2002 23:00
32 lines
1680 bytes
1680 bytes
Ah, but I wrote it (the original, backward-counting version) to deal with phone numbers longer than eight characters!<g>
And it does that darned well! <g> Thanks, Ole!
OK, I think I'm getting it, now. The line
set myFoundItems to search myDocument with find attributes {yudda:yudda}
creates a list of instances that meet all the attributes. Then this line
repeat with myCounter from (count myFoundItems) to 1 by -1
says (not in this order) "count how many items are in this list, then each time you do something, count backwards by one starting with the number you just got."
And this line
set myFoundItem to item myCounter of myFoundItems
say "whatever number you just counted, go to the list and play with the item with that number."
Am I close? For just a couple lines of code, a lot of things seem to be happening.
Jay
Technical Details
Message-ID:
<ef98891.4@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!feed.textport.net!news.stealth.net!news.stealth.net!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-11 16:14:23 PST From: "Jay Fraser" <jayfraser@yahoo.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-01!sn-xit-08!supernews.com!feed.textport.net!news.stealth.net!news.stealth.net!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.4@WebX.aaQKaf7vad4> Date: Thu, 11 Jul 2002 16:00:36 -0700 References: <ef98891.-1@WebX.aaQKaf7vad4> Lines: 39 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit