🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #20466

Re: Insert Character in middle of selection

#20466
From: Olav Kvern
Date: Fri, 12 Jul 2002 15:33
25 lines
1808 bytes
Jay-- 

Another way to look at it: when you use a "standard" form of the repeat loop, as in: 

--where some_items is a collection object 
repeat with myCounter from 1 to (count some_items) 
 

It should be clear that the loop starts with item 1 and then counts to the end of the collection. As it does so, it increments the loop variable myCounter. So you can refer to one of the objects in the collection using the variable, as in: 

set myObject to item myCounter in some_items 
 

By default, the loop increments by 1 each time: 1, 2, 3, etc.--but we can change that using the "by" keyword, as in: 

repeat with myCounter from 5 to 100 by 5 
 

..which would make myCounter equal 5, 10, 15, 20, etc. We used a negative increment to make the loop count backwards through the list of items in the collection. 

I think you've got it already, but I just thought I'd add this (long winded, pedantic) explanation. 

Thanks, 

Ole
Technical Details
Message-ID: <ef98891.6@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.nyc.globix.net!news.stealth.net!news.stealth.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <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-12 08:42:00 PST
From: "Olav Kvern" <okvern@adobe.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.nyc.globix.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.6@WebX.aaQKaf7vad4>
Date: Fri, 12 Jul 2002 08:33:34 -0700
References: <ef98891.-1@WebX.aaQKaf7vad4>
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit