Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

altering fill of selected table cells based on content

7 views
Skip to first unread message

Justin C

unread,
Jul 10, 2012, 6:57:32 AM7/10/12
to

InDesign CS2 & AppleScript


I'm selecting a group of cells in a table, and, if the text in
the cell is "N", I want the cell fill to be changed (there is
no fill currently, I want black with 40% tint).

Currently I have the following, cobbled together from various
resources on the web. I can't work out how to work through each
of the cells in the selection because my 'count of items in
selection' appears to be 1, I suppose that means there is one
contiguous selection only, but not the contents of that
selection.


tell application "Adobe InDesign CS2"
-- Check we've got a document open
if (count documents) is not equal to 0 then
set mySelection to selection
-- Do we have anything selected?
if (count mySelection) is not equal to 0 then
-- check the selection is table cells
set myCellClasses to {column, row, table, line, cell}
if class of item 1 of selection is in myCellClasses then
--
else
display dialog "You have not selected any table cells"
end if
else
display dialog "There is nothing selected"
end if
else
display dialog "There is no InDesign document open"
end if
end tell

I suppose I need help accessing the contents of the selection,
and then iterating over them.

Any help will be gratefully received.

Justin.

--
Justin C, by the sea.
0 new messages