Article View: adobe.scripting.indesign
Article #14901Re: JS beginners help
From: Dave_Saunders
Date: Fri, 16 Jan 2004 00:22
Date: Fri, 16 Jan 2004 00:22
13 lines
1057 bytes
1057 bytes
You've misunderstood the meaning of the square brackets in the syntax. They mean: "This is an optional parameter, leave it out if you wish." But if you do include it, forget about the square brackets.
So, change
myResult = myText.indexOf("�"[,i]);
to
myResult = myText.indexOf("�",i);
I don't know that that will solve the whole problem (but then, you didn't say much about what the problem was).
Dave
Technical Details
Message-ID:
<2ccf45cf.23@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2ccf45cf.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,613db9f5b5ffc527 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2004-01-15 16:37:52 PST From: Dave_Saunders@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: JS beginners help Message-ID: <2ccf45cf.23@webx.la2eafNXanI> Date: Thu, 15 Jan 2004 16:22:35 -0800 References: <2ccf45cf.-1@webx.la2eafNXanI> Lines: 16 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit