Article View: adobe.scripting.indesign
Article #14525Re: [JS] Copying a small string to memory (and deleteing it)
From: Dirk_Becker
Date: Tue, 27 Jan 2004 18:02
Date: Tue, 27 Jan 2004 18:02
15 lines
1247 bytes
1247 bytes
If myString.indexOf(...) worked, myString is apparently a javascript string. Therefor it should have no characters property. So correct your last line myString.characters.itemByRange(... => myStory.characters.itemByRange(... --------- Dave: "Of course you can use a constant, if it is larger than myStart. If it's not, it's going to find the one at MyStart every time. Why would you expect otherwise? " I guess the second argument to indexOf() was wrongly thought as the nth occurence. Dave is right in this regard, that argument is counting characters. Dirk
Technical Details
Message-ID:
<2ccf9ac5.8@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccf9ac5.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,47d76c5f53276933 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-27 10:08:02 PST From: Dirk_Becker@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: [JS] Copying a small string to memory (and deleteing it) Message-ID: <2ccf9ac5.8@webx.la2eafNXanI> Date: Tue, 27 Jan 2004 10:02:45 -0800 References: <2ccf9ac5.-1@webx.la2eafNXanI> Lines: 20 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit