🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #10225

correspondent of "itemByRange" (JS) in AS

#10225
From: Martin Fischer*
Date: Wed, 28 Jun 2006 12:49
20 lines
1432 bytes
In JavaScript there is a method "itemByRange" to define a range object.
E.g. "myStory.characters.itemByRange(17, 25)"

What is this in AppleScript?

A friend of mine is trying to translate my JavaScript which applies a character style to text between two tags (e.g. between Start-Tag "@11" and End-Tag "@12") to AppleScript because of some restrictions of JS in footnotes.

The occurances of the Start- and the End-Tags are fetched with the search method. And then in a loop there should be defined objects from item i of start-Items to item i of stop-Items to apply a character style to them.

In JS it is something like this:

 
myStory.characters.itemByRange(start[myCounter].index, stop[myCounter].index).appliedCharacterStyle = myCharStyle)



But how to build this line in AppleScript?

Thanks
Martin
Technical Details
Message-ID: <3bc0beb1.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,dcff34b489ad5a4e,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Martin Fischer*" <martin.fischer@online.de>
Newsgroups: adobe.scripting.indesign
Subject: correspondent of "itemByRange" (JS) in AS
Message-ID: <3bc0beb1.-1@webcrossing.la2eafNXanI>
Date: Wed, 28 Jun 2006 05:49:47 -0700
Lines: 24
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.volia.net!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing