rj
2013-01-25 17:44:37
So I was messing around with count color, and I was wondering how would I look for a count of color that appear within lets say a 5x5 pixel range anywere on the screen, instead of it just looking for count pixels in one area.
Best code I got is:
Best code I got is:
program new;
{$i srl/srl.simba}
const
TOL = 15;
ONE = 12761001; // each word is 40 14846307
var
CountOne, FileFind: Integer;
begin
MouseSpeed := 15;
ClearDebug;
// 0 0 1914 1041
CountOne := CountColorTolerance(ONE, 0, 0, 1914, 1041, TOL);
FileFind := CountOne/33;
Writeln('There are about ' + IntToStr(FileFind) + ' .jar documents on the desktop');
Writeln('There are ' + IntToStr(CountOne) + ' Pixels that are ' + IntToStr(ONE) + ' color');
end.