I’m looking to simplify this script to avoid having all of these repetitive lines, by being able to put all the column range and width values for the first set into a single-line array that gets called by a single set width of column line, and all the column range and alignment values into a single-line array that gets called by a single set alignment of column. Is that possible to do?
Thanks!
tell application "Numbers"
tell table 1 of sheet 1 of document myDoc
set width of column "A" to 90
set width of column "B" to 90
set width of column "C" to 80
set width of column "D" to 60
set width of column "E" to 60
set width of column "F" to 80
set width of column "G" to 50
set width of column "H" to 50
set width of column "I" to 90
set width of column "J" to 60
set width of column "K" to 60
set width of column "L" to 110
set width of column "M" to 110
set width of column "N" to 110
set width of column "O" to 60
set width of column "P" to 60
set width of column "Q" to 70
set width of column "R" to 40
set width of column "S" to 60
set width of column "T" to 80
set width of column "U" to 70
set width of column "V" to 40
set width of column "W" to 40
set alignment of column "A" to right
set alignment of column "B" to right
set alignment of column "C" to right
set alignment of column "D" to right
set alignment of column "E" to right
set alignment of column "F" to right
set alignment of column "G" to right
set alignment of column "H" to right
set alignment of column "I" to right
set alignment of column "J" to right
set alignment of column "K" to right
set alignment of column "L" to right
set alignment of column "M" to right
set alignment of column "N" to right
set alignment of column "O" to right
set alignment of column "P" to right
set alignment of column "Q" to right
set alignment of column "R" to right
set alignment of column "S" to right
set alignment of column "T" to right
set alignment of column "U" to right
set alignment of column "V" to right
set alignment of column "W" to right
end tell
end tell