ur problem is here
SCAR Code:
repeat
LoadBmp;
UseBmp;
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);
first of all.. u only need to load the Bmp Once.. so it should look like this
SCAR Code:
LoadBmp;
repeat
UseBmp;
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);
second of all.... if it doesn't find the bitmap.. it will still add C + 1
so first we need to edit this:
SCAR Code:
procedure UseBmp;
begin
if(FindBitmapIn(untitled,x,y,394, 356,409, 367)) then
begin
MoveMouseSmooth(x,y);
Wait(loadtime);
ClickMouse(x,y,true);
end;
end;
to
SCAR Code:
function UseBmp : boolean;
begin
if(FindBitmapIn(untitled,x,y,394, 356,409, 367)) then
begin
MoveMouseSmooth(x,y);
Wait(loadtime);
ClickMouse(x,y,true);
Result := True;
end;
end;
this return true if the button was clicked.
now we need to change this part again:
SCAR Code:
LoadBmp;
repeat
UseBmp;
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);
to
SCAR Code:
LoadBmp;
repeat
if UseBmp then //if the button was clicked it will add one, else it wont
c:= c + 1;
until (c = 350)
FreeBitmap(untitled);