🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #10250

Re: correspondent of "itemByRange" (JS) in AS

#10250
From: Shane_Stanley
Date: Wed, 28 Jun 2006 22:53
27 lines
1990 bytes
On 29/6/06 12:05 AM, "Milazzo David" <member@adobeforums.com> wrote:

> I find that :  
> set logname to characters 1 through ((length of pictname) - 4) of pictname as
> string 

That's not a good way to do it. You're getting a list of characters and then
coercing them to a string -- that's inefficient, and also potentially
troublesome, depending on what your text item delimiters are set to. Better
to use:

 set theText to text from character x to character y of myStory

which gets the contents, or:

 set theText to object reference of text from character x to character y of
myStory

to get a reference to it.

To apply a style, Martin can use:

 set applied character style of text from character x to character y of
myStory to myCharStyle

-- 
Shane Stanley <sstanley@myriad-com.com.au>
Technical Details
Message-ID: <C0C94594.2C547%sstanley@myriad-com.com.au>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.datemas.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing
References: <3bc0beb1.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,dcff34b489ad5a4e
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Shane_Stanley@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: Re: correspondent of "itemByRange" (JS) in AS
Message-ID: <C0C94594.2C547%sstanley@myriad-com.com.au>
Date: Wed, 28 Jun 2006 15:53:40 -0700
References: <3bc0beb1.-1@webcrossing.la2eafNXanI>
Lines: 33
Received: from bld-mail03.adl2.internode.on.net [203.16.214.67] by adobeforums.com; Wed, 28 Jun 2006 15:53:44 -0700
Received: from [192.168.1.3] (unverified [59.167.188.54])  by mail.internode.on.net (SurgeMail 3.2f) with ESMTP id 14304460  for <adobe.scripting.indesign@adobeforums.com>; Thu, 29 Jun 2006 08:22:10 +0930 (CST)
Return-Path: <sstanley@myriad-com.com.au>
User-Agent: Microsoft-Entourage/11.2.4.060510
Thread-Topic: correspondent of "itemByRange" (JS) in AS
Thread-Index: AcabBbKW8S5j+gb4Edu3jQARJHm3nA==
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!news.datemas.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing