Article View: adobe.scripting.indesign
Article #20206Re: [AS] table column width properties?
From: Olav Kvern
Date: Mon, 05 Aug 2002 20:07
Date: Mon, 05 Aug 2002 20:07
37 lines
2151 bytes
2151 bytes
Nathan--
Something like this?
set myString to "column 1a" & tab & "column 2a" & tab & "column 3a" & return
set myString to myString & "column 1b" & tab & "column 2b" & tab & "column 3b"
tell application "InDesign 2.0.1"
set myDocument to make document
tell page 1 of myDocument
set myBounds to my myGetBounds(page 1 of myDocument, myDocument)
set myTextFrame to make text frame with properties {geometric bounds:myBounds, contents:myString}
end tell
tell story 1 of myDocument
set myTable to make table
end tell
tell myTable
set width of column 1 to ((width of column 1) / 2)
set width of column 2 to ((width of column 2) + ((width of column 2) / 2))
end tell
end tell
on myGetBounds(myPage, myDocument)
tell application "InDesign 2.0.1"
set myPageWidth to page width of document preferences of myDocument
set myPageHeight to page height of document preferences of myDocument
set myX1 to margin left of margin preferences of myPage
set myY1 to margin top of margin preferences of myPage
set myX2 to myPageWidth - (margin right of margin preferences of myPage)
set myY2 to myPageHeight - (margin bottom of margin preferences of myPage)
return {myY1, myX1, myY2, myX2}
end tell
end myGetBounds
Thanks,
Ole
Technical Details
Message-ID:
<efa0947.0@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<efa0947.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,10ba3ce362b3808a X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-08-05 13:41:10 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-08!supernews.com!newsfeed.wirehub.nl!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!news-spur1.maxwell.syr.edu!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: Re: [AS] table column width properties? Message-ID: <efa0947.0@WebX.aaQKaf7vad4> Date: Mon, 5 Aug 2002 13:07:55 -0700 References: <efa0947.-1@WebX.aaQKaf7vad4> Lines: 43 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit