| strange..... I have CS, so does my friend.
So i made a script in JS that does loads of things.......
One of them is that i am making a selection and filling it with a color, like
beneath, BUT it works on 3 different pc's with CS, but at my friends
PC it just draws a 1x2 pixels (hxw) square, instead of filling the whole
layer (doc.width and doc.height).....this puzzles me a LOT!
He reinstalled many times already, still nogo......
Any thoughts? the problem seems the size of selection (doc.selection.select(selectionBounds,SelectionType.REPLACE,0,false);
)
//create the 4 backgroundlayers with colors
var selectionBounds = [[0,doc.height],[doc.width,doc.height],[doc.width,0],[0,0]];
for (var b = 0;b<4;b++) {
var newLayerRef = doc.artLayers.add();
newLayerRef.name = layerBGArrNames[b];
var randomColor = new SolidColor;
randomColor.rgb.red = layerBGArrColors[b][0];
randomColor.rgb.green = layerBGArrColors[b][1];
randomColor.rgb.blue = layerBGArrColors[b][2];
doc.selection.select(selectionBounds,SelectionType.REPLACE,0,false);
doc.selection.fill(randomColor);
doc.selection.deselect();
randomColor = null;
} |