🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #19037

How can I know if the selection is a table (AS)?

#19037
From: Olivier Berquin
Date: Wed, 29 Jan 2003 10:01
29 lines
1424 bytes
Hello fellows scripters,



 
tell application "InDesign 2.0.2" 
	set mySelection to selection 
	set myClass to class of mySelection  


If the selection is a text inside a cell of a table, myClass = insertion point 1 of cell id 5 of table id 242 of text frame id 162 of page id 119 of spread id 114 of document "test-1"

Now, from this, how can I know if the selection is a table?
myClass = "insertion point" and not "cell", not "table", ...

If I use

 
set myClass to parent of item 1 of mySelection 


myClass becomes: cell id 1 of table id 242 of text frame id 162 of page id 119 of spread id 114 of document "test-1"

Do I analyze the string ?
Another way to find this ?

TIA

Olivier.
Technical Details
Message-ID: <1de79947.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,7f39463cb8e4a6cd,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-01-29 02:08:04 PST
From: "Olivier Berquin" <olb@microscript.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: How can I know if the selection is a table (AS)?
Message-ID: <1de79947.-1@WebX.la2eafNXanI>
Date: Wed, 29 Jan 2003 02:01:55 -0800
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit