🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14628

Re: JS undefined properties...

#14628
From: Dave_Saunders
Date: Sun, 25 Jan 2004 22:53
13 lines
1284 bytes
Roy,

You're getting into trouble for the reason I mentioned. Konstantin's method works because he's transferring the data into JS space and not manipulating it in situ. Note that he's adding a character after the last the character, not replacing the last character.

So, yes, \r and \n are JS for return and new line.

If you want to change the last character of myLine to a return you can write:

myLine.characters[-1].contents = "\r"

Again, "\r" works because it is being translated in JS space. If you were doing it using InDesign's Find/Change, then you'd use ^p.

Dave
Technical Details
Message-ID: <2ccf884d.10@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccf884d.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,c2ae6c74d069cf9
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-25 15:07:44 PST
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: JS undefined properties...
Message-ID: <2ccf884d.10@webx.la2eafNXanI>
Date: Sun, 25 Jan 2004 14:53:48 -0800
References: <2ccf884d.-1@webx.la2eafNXanI>
Lines: 18
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit