Code: Select all
$doc = Document.active
$octals = Array.new
foreach $tblSel in $doc.tableSelections
foreach $cell in $tblSel.cells
$octals.push $cell.row & $cell.column
end
end
$out = $octals
Document.newWithText "$out"
My question is: How can I do the inverse: How can I select the 3 cells, knowing there position in the matrix?
What I try to do is to manipulate the selection. For a simple case like inverting row and column this can of course be done by swapping within the push expression. But what about changing the row number, for example. I tried:
Code: Select all
$octals.push $cell.column & (7-$cell.row)
Code: Select all
$octals.push (7-$cell.column) & $cell.row