Article View: adobe.scripting.indesign
Article #140Re: checking type of pageItem
From: pd
Date: Thu, 02 Apr 2009 19:59
Date: Thu, 02 Apr 2009 19:59
18 lines
1806 bytes
1806 bytes
On Apr 2, 12:19 pm, stefan...@adobeforums.com wrote: > Hello, is there any way to check in JavaScript what is the type of some PageItem. For example I have a Rectangle, and when I try to do it that way it return useless information: > > alert(app.activeDocument.pageItems.item(0).constructor.name); > > The result is "PageItem" :/ > > In VBScript it is very easy, I can use TypeName() function, but i need this script working on MacOS. > > Can anyone help me???? > Thanks in advance For InDesign CS4, I think the preferred way is: var type = myPageItem.reflect.name;
Technical Details
Message-ID:
<574b5648-77df-4d11-a0dd-4ad67939b021@e24g2000vbe.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!e24g2000vbe.googlegroups.com!not-for-mailReferences:
<59b87b76.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,1898028eb4bd8c65 X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!e24g2000vbe.googlegroups.com!not-for-mail From: pd <pfdavis@gmail.com> Newsgroups: adobe.scripting.indesign Subject: Re: checking type of pageItem Date: Thu, 2 Apr 2009 12:59:35 -0700 (PDT) Organization: http://groups.google.com Lines: 18 Message-ID: <574b5648-77df-4d11-a0dd-4ad67939b021@e24g2000vbe.googlegroups.com> References: <59b87b76.-1@webcrossing.la2eafNXanI> NNTP-Posting-Host: 66.150.206.225 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1238702375 32758 127.0.0.1 (2 Apr 2009 19:59:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 2 Apr 2009 19:59:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e24g2000vbe.googlegroups.com; posting-host=66.150.206.225; posting-account=G2l8pgoAAABQYixzPXgqN3qQugbP4n5s User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8,gzip(gfe),gzip(gfe)