If you just want to check 10px X 10px bottom right function hasBlackBottomRight(){ var doc = activeDocument; var w = doc.width.as('px'); var h = doc.height.as('px'); var t = new Array( new UnitValue(w-10,'px'),new UnitValue(h-10,'px')); var r = new Array( new UnitValue(w,'px'), new UnitValue(h-10,'px')); var b = new Array( new UnitValue(w,'px'), new UnitValue(h,'px')); var l = new Array( new UnitValue(w-10,'px'), new UnitValue(h,'px')); doc.selection.select([t,r,b,l]); return !!!doc.histogram.toString().match(/,[1-9]/g); } if( hasBlackBottomRight()){ // code to deal with black line at bottom; alert('All black at bottom right'); }else{ // code to deal with missing black line; alert('Non black colors at bottom right'); }
... View more