🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14535

Re: [JS] Copying a small string to memory (and deleteing it)

#14535
From: Roy_Marshall
Date: Tue, 27 Jan 2004 22:29
17 lines
1472 bytes
It is beginning to sink in that certain objects are ID objects, and therefore have different properties than JS objects. The indexOf property was carried out on a JS string, and then reverting back to the ID String I can apply the index value. Sorry if I am babling, but I am trying to get things clear. Am I correct in this thinking?

This is still throwing up the error:
"invalid parameter" on the last line

myPara = myTild[i].paragraphs[0]; //ID String
myString = myPara.contents;	//JS String	
myStart = myString.indexOf("\t",2);
myEnd = myString.indexOf("\t",myStart+1);
myNewPos = myString.indexOf("\t",myEnd+1);
	myPara.characters.itemByRange(myStart,myEnd).move(LocationOptions.atBeginning,myNewPos);

It is getting late, and I have spent the last couple of hrs on it and give up!!

Cheers

Roy
Technical Details
Message-ID: <2ccf9ac5.9@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <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 14:38:48 PST
From: Roy_Marshall@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.9@webx.la2eafNXanI>
Date: Tue, 27 Jan 2004 14:29:04 -0800
References: <2ccf9ac5.-1@webx.la2eafNXanI>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit