🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #8697

Re: Javscript doubt

#8697
From: Dave_Saunders
Date: Fri, 29 Sep 2006 14:58
14 lines
963 bytes
If this is JavaScript, then you're using the wrong kind of loop. the:

for (i in Object)

structure is a mechanism for iterating through all the names of the properties of an object.

You want:

var mydoc = app.activeDocument;
var myobst = mydoc.objectStyles;
for (var i = 0; myobst.length > i; i++)
{alert (myobst[i].name);}

Dave
Technical Details
Message-ID: <3bc1d239.3@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.germany.com!news.mb-net.net!open-news-network.org!news.isoc.lu!webcrossing
References: <3bc1d239.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,4a28de6506f03fbb
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Dave_Saunders@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.germany.com!news.mb-net.net!open-news-network.org!news.isoc.lu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Javscript doubt
Message-ID: <3bc1d239.3@webcrossing.la2eafNXanI>
Date: Fri, 29 Sep 2006 07:58:42 -0700
References: <3bc1d239.-1@webcrossing.la2eafNXanI>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit