🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15071

Re: JS: Terminology Question

#15071
From: Dave_Saunders
Date: Tue, 16 Dec 2003 04:34
26 lines
1410 bytes
So collection is the right term then. That's certainly connects.

So, how do I collect all but the first? Using itemByRange:

myTarget = app.documents[0].paragraphStyles.itemByRange(1,-1);

Does that work? I guess I should try it.

Well, it kind of works, but not the way I wanted it; to work with the result you have to use getElements(), and that breaks the symmetry. Here's what I ended up doing to get around this problem:

switch (Utarg) {
	case 0 :
		theTarget = [undefined, app.selection[0]];
		break;
	case 1 :
		theTarget = [undefined, app.documents[0].paragraphStyles.item(mySettings.name)];
		break;
	case 2 :
		theTarget = app.documents[0].paragraphStyles;
}

for (n = 1; n < theTarget.length; n++) {
	mySettings = theTarget[n].properties;
etc.

Dave
Technical Details
Message-ID: <2ccef1cd.1@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: <2ccef1cd.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,69e60e8259feb646
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-12-15 20:38:09 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: Terminology Question
Message-ID: <2ccef1cd.1@webx.la2eafNXanI>
Date: Mon, 15 Dec 2003 20:34:59 -0800
References: <2ccef1cd.-1@webx.la2eafNXanI>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit