Hi!
Do you can help me? I have a big problem. I tried to find a bitmap in the window and click it. But it doesn't work. I'll show my bitmap. Hope you can help.
P.S: The bitmap is now .jpg because it was to big as bitmap.
Hi!
Do you can help me? I have a big problem. I tried to find a bitmap in the window and click it. But it doesn't work. I'll show my bitmap. Hope you can help.
P.S: The bitmap is now .jpg because it was to big as bitmap.
Try targeting the window with the crosshair, if not try this:
SCAR Code:program Test;
var
bmp, xx, yy: Integer;
begin
bmp := BitmapFromString(0, 0, ''); // Insert your bmp here.
if (FindBitmap(bmp, xx, yy)) then
begin
MoveMouseSpline(xx, yy, 2, 2);
GetMousePos(xx, yy);
ClickMouseSpline(xx, yy, 2, 2, True);
Writeln('Bitmap found.');
end
else begin
Writeln('Bitmap not found.');
end;
end.
Maybe have a smaller bitmap of just a unique part of the thing you want to find? And be sure to save the bitmap has 32-bit.
Huehuehuehuehue
Try this:
SCAR Code:program New;
{.Include SRL/SRL.scar}
var
Bitmap,toler : integer;
procedure LoadBitmaps;
begin
Bitmap:=//insert bitmap here
end;
procedure FindBitmaps;
begin
repeat
if FindBitmapToleranceIn(Btimap, x, y, 0, 0, 1023, 767, toler)then
Mouse(x,y,2,2,true)
WriteLn('Found Bitmap.')
if not FindBitmapToleranceIn(Btimap, x, y, 0, 0, 1023, 767, toler)then
WriteLn('Didn'#39't find Bitmap adding tol.')
toler:= toler + 5;
until(FindBitmapToleranceIn(Btimap[1], x, y, 0, 0, 1023, 767, toler))
end;
begin
SetUpSrl;
toler:= 5;
LoadBitmaps;
FindBitmaps;
end.
Just put in the bitmap... Should work...Hopefully
~Stupedspam
Thanks. It seems to work but it doesn't click and in the box come:
Code:SRL Compiled in 109msec. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. Found Bitmap. Didn't find Bitmap adding tol. ...
But thanks![]()



stupedspam left out some begin's and end's in his if's.
SCAR Code:program New;
{.Include SRL/SRL.scar}
var
Bitmap,toler : integer;
procedure LoadBitmaps;
begin
Bitmap:=//insert bitmap here
end;
procedure FindBitmaps;
begin
repeat
if FindBitmapToleranceIn(Btimap, x, y, 0, 0, 1023, 767, toler)then
begin
Mouse(x,y,2,2,true)
WriteLn('Found Bitmap.')
end;
if not FindBitmapToleranceIn(Btimap, x, y, 0, 0, 1023, 767, toler)then
begin
WriteLn('Didn'#39't find Bitmap adding tol.')
toler:= toler + 5;
end;
until(FindBitmapToleranceIn(Btimap[1], x, y, 0, 0, 1023, 767, toler))
end;
begin
SetUpSrl;
toler:= 5;
LoadBitmaps;
FindBitmaps;
end.
and you need to instert the bitmap where it says "insert bitmap here" and make sure your draggin the crosshairs to the window.
It works!
Thank you all very much.
There are currently 1 users browsing this thread. (0 members and 1 guests)