🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #131

[JS] checking type of pageItem

#131
From: stefan123
Date: Thu, 02 Apr 2009 16:19
10 lines
952 bytes
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
Technical Details
Message-ID: <59b87b76.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,1898028eb4bd8c65,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: stefan123@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: [JS] checking type of pageItem
Message-ID: <59b87b76.-1@webcrossing.la2eafNXanI>
Date: Thu, 2 Apr 2009 09:19:20 -0700
Lines: 13
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit