🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14907

Re: [JS] Add XML tags to all graphics?

#14907
From: Olav_Kvern
Date: Thu, 08 Jan 2004 22:15
9 lines
1223 bytes
Phil--

Use the array[index] form (as Peter pointed out) when you're referring to a JavaScript array you've created. Most of the time, it's OK to use it for InDesign collections, such as app.activeDocument.pages[0]. In general, however, I use the "item" form for collection objects, as in: app.activeDocument.pages.item(0). This helps me differentiate between my script's arrays and InDesign collections as I read my scripts, and lets me use name references such as: app.activeDocument.colors.item("Black").

I found JavaScript really annoying at first, but now I like it.

Thanks,

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

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,e9c87384022b9c4b
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-08 14:37:57 PST
From: Olav_Kvern@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] Add XML tags to all graphics?
Message-ID: <2ccf3d9d.2@webx.la2eafNXanI>
Date: Thu, 8 Jan 2004 14:15:16 -0800
References: <2ccf3d9d.-1@webx.la2eafNXanI>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit