Article View: adobe.scripting.indesign
Article #17911Re: Fill color of a row (AS)
From: Jay Fraser
Date: Wed, 07 May 2003 17:35
Date: Wed, 07 May 2003 17:35
42 lines
1949 bytes
1949 bytes
OK, here we go:
tell application "InDesign 2.0.2"
tell active document
set myBlack to swatch "Black"
set mySelection to object reference of selection
if class of selection is text or class of selection is insertion point then
set myParent to parent of selection
set mySelection to myParent
end if
if class of selection is not row then
set myTable to parent of item 1 of mySelection
set oldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set cellRef to (name of item 1 of mySelection)
set rowRef to (text item 2 of cellRef) as integer
set mySelection to row rowRef of myTable
set AppleScript's text item delimiters to oldDelim
end if
set myTable to parent of item 1 of mySelection
tell myTable
set fill color of mySelection to myBlack
set fill tint of mySelection to 10
end tell
end tell
end tell
The only silly thing about this is that it only changes the 1st row if you select several rows.
That was fun. Why is it so much more fun to work on somebody else's problem?
--Jay
Technical Details
Message-ID:
<1de90365.5@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de90365.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,ee08932ee4f528f6 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-05-07 10:38:44 PST From: "Jay Fraser" <jayfraser@yahoo.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: Fill color of a row (AS) Message-ID: <1de90365.5@WebX.la2eafNXanI> Date: Wed, 7 May 2003 10:35:21 -0700 References: <1de90365.-1@WebX.la2eafNXanI> Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit