Article View: adobe.scripting.indesign
Article #14547Re: [JS] Copying a small string to memory (and deleteing it)
From: Dave_Saunders
Date: Wed, 28 Jan 2004 12:19
Date: Wed, 28 Jan 2004 12:19
11 lines
1845 bytes
1845 bytes
Roy, No it doesn't use myPara at the beginning of the line because you can move from one place to any other. The myPara determines what you're moving; the other parameter determines where you're moving to (it only happened that in this case you were moving within a paragraph). You can move from one document to another, if you wanted to. I agree that working out the syntax from the Scripting Guide is challenging, particularly if you're new to the language. You have drifted into a style of working (at least in this script) where you're doing a lot of things in JavaScript variables that I would have done using InDesign objects. But in truth, as long as you can keep things straight in your mind, your way might actually be quicker. You'll note that your indexes only work because the strings you're working with are unicode. If the 2.0.2 mechanism of passing off <nnnn> strings for non-ASCII characters was still in effect then your indexes might have been wrong. It might be a good idea to use "id" and "js" as prefixes to your variable names to indicate to yourself which is which. It's not necessary, of course, but it might help you think through these things. Dave
Technical Details
Message-ID:
<2ccf9ac5.14@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.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-28 04:37:38 PST From: Dave_Saunders@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.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.14@webx.la2eafNXanI> Date: Wed, 28 Jan 2004 04:19:31 -0800 References: <2ccf9ac5.-1@webx.la2eafNXanI> Lines: 25 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit