Kave
2008-05-07 07:11:01
I modified the InPin function so that the mouse doesn't leave the keypad, its more how i enter my bank pin. Only problem is that sometimes it wont actually click, it'll move to the right number then it will just wait, im guessing that the click isnt recognized by the keypad or something….
function SmoothInPin(Pin:String):Boolean;
var
num,x,y,sx,ex,sy,ey,z: Integer;
begin
if (PinScreen) then
begin
sx := 430;
sy := 30;
ex := 445;
ey := 50;
for num := 1 to Length(Pin) do
begin
z := 0;
if not(FindText(x,y,Pin[num],UpChars,1,1,512,336)) then
GetMousePos(x,y);
Mouse(x,y,0,0,true);
repeat
wait(10);
inc(z);
until FindText(x,y,'*',UpChars,sx,sy,ex,ey) or BankScreen or not(LoggedIn) or (z > 50);
if z > 50 then
begin
Result := False;
FindText(x,y,'Exit',UpChars,MSX1,MSY1,MSX2,MSY2);
Mouse(x,y,0,0,true);
exit;
end;
sx := ex;
ex := ex + 15;
Wait(100);
end;
repeat
Wait(100);
until BankScreen or not LoggedIn;
end;
Result := BankScreen;
end;