mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-08 20:28:23 -05:00
37 lines
699 B
Plaintext
37 lines
699 B
Plaintext
program new;
|
|
|
|
var
|
|
Bmp : integer;
|
|
x,y : integer;
|
|
w,h : integer;
|
|
t, i, c: integer;
|
|
begin
|
|
Bmp := createBitmap(15, 10);
|
|
FastDrawClear(bmp, clRed);
|
|
GetClientDimensions(w,h);
|
|
writeln(w);
|
|
writeln(h);
|
|
|
|
for c := 0 to 2 do
|
|
begin
|
|
writeln('cts: ' + inttostr(c));
|
|
setcolortolerancespeed(c);
|
|
|
|
t:=getsystemtime;
|
|
for i := 0 to 10 do
|
|
findBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,10);
|
|
writeln((getsystemtime-t) / 10.0);
|
|
if findBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,10) then
|
|
begin
|
|
writeln('found');
|
|
movemouse(x,y);
|
|
end;
|
|
end;
|
|
|
|
{if FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,300) then
|
|
begin
|
|
writeln('found');
|
|
MoveMouse(x,y);
|
|
end;}
|
|
end.
|