Is it possible to make multiple selection and then fill it? (its not a continous selection, its multiple squares/rectangles and they dont overlap)
Manually I would select a rectangle, then use 'shift' and make second selection, use 'shift' again and make next selection... [refer attachment]
Code: Select all
var ad = app.activeDocument;
ad.selection.select([ [0,0], [0,10], [10,10], [10,0] ]); // first square
ad.selection.select([ [20,20], [20,30], [30,30], [30,20] ]); // second square
...
ad.selection.select([ [200,200], [200,230], [230,230], [230,200] ]); // nth square
ad.selection.fill( app.foregroundColor);