Article View: adobe.scripting.indesign
Article #19227Re: validating object in AS
From: Olav Kvern
Date: Sun, 12 Jan 2003 19:19
Date: Sun, 12 Jan 2003 19:19
41 lines
1958 bytes
1958 bytes
Reinhardt-- Dave's got it right (as usual). Here's an example: tell application "InDesign 2.0.1" set mySelection to selection if (count mySelection) > 0 then set myClass to class of item 1 of selection --If a table is selected, the class of the selection is cell. --Find out whether the selection contains a single cell, a --range of cells, or the entire table. if myClass is cell then set myCount to (count cells of item 1 of selection) if myCount = 1 then display dialog "A single cell is selected." else if myCount = (count cells of parent of item 1 of selection) then --The parent of a cell is a table. display dialog "A table is selected." else display dialog "The selection contains a range of cells." end if else if myClass is row then display dialog "A row is selected." else if myClass is column then display dialog "A column is selected." else display dialog "No table objects are selected." end if end if end tell You should be able to modify this script to do whatever it is you want to do with the table. Thanks, Ole
Technical Details
Message-ID:
<1de757cd.1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1B52FC0AF9FE552EFC1980205E2C059D@in.WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,4fc3a4cf8c70e00d X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-01-12 11:37:52 PST From: "Olav Kvern" <okvern@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: validating object in AS Message-ID: <1de757cd.1@WebX.la2eafNXanI> Date: Sun, 12 Jan 2003 11:19:24 -0800 References: <1B52FC0AF9FE552EFC1980205E2C059D@in.WebX.la2eafNXanI> Lines: 39 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit