ForumI'm using this script but it gives a syntax error at Scriptographer Scriptsaverage color.js:16
var rasters = document.getItems({
type: Raster,
selected: true
});
var paths = document.getItems({
type: Path,
selected: true
});
// if the user has selected an image and at least one path
if(rasters.length > 0 && paths.length > 0) {
var raster = rasters[0];
// loop through the paths
for (var i = 0; < paths.length; i++) {
var path = paths[i];
var color = raster .getAverageColor(path);
path.fillColor = color;
}
} else {
Dialog.alert('Please select an image and at least one path');
Can someone tell me what is wrong?
Thanks in advance