🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14601

JS undefined properties...

#14601
From: Roy_Marshall
Date: Fri, 23 Jan 2004 13:47
44 lines
1936 bytes
Hi, me again!

I have now got to a stage in my script where I need to (subject to condition) add carriage returns at the end of a line (forcing a right indent effect). I have got as far as defining separate paragraphs that contain more that 1 line, but I need help to add a carriage return at the end of each line (as it has a right indent style sheet attached) and apply a stye sheet with no right indent to the last line.
Here is what I have so far.....

myStory			=app.selection[0].parentStory;
app.findPreferences 	= null;
app.changePreferences 	= null;
myPounds		= myStory.search("�");
myPoundCnt		=myPounds.length;

for (i=myPoundCnt-1; i>=0 ; i--)
	{
	myPound		=myPounds[i];
	myPara		=myPound.paragraphs[0];
	myLineCnt	=myPara.lines.length;
	if (myLineCnt >1)
		{
		alert ("this has " + myLineCnt + " lines")
		for (myLineStep=myLineCnt; myLineStep >=1 ;myLineStep--)
			{
			myLine=myPara.lines[myLineStep].content;
			alert ("Line is " + myLine);
			//returns "Line is undefined"
			}
		}



	}

I have put the id file on my FTP site, this would give a better idea of what i am hopelessly trying to explain!

ftp 217.45.195.234
User: nemo
password: capta1N
directory: roy
File name: kidner.indd

If anyone has any other ideas how to tackle this please let me know!

Thanks again

Roy
Technical Details
Message-ID: <2ccf884d.-1@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!webx

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f939a,c2ae6c74d069cf9,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-23 06:07:49 PST
From: Roy_Marshall@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: JS undefined properties...
Message-ID: <2ccf884d.-1@webx.la2eafNXanI>
Date: Fri, 23 Jan 2004 05:47:01 -0800
Lines: 49
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit