RAM
2011-03-14 04:31:04
I added a wait in InPin,in my version to compensate for lag….
2011-03-14 04:31:04
2011-03-14 05:28:04
2011-03-14 09:53:15
2011-03-14 09:56:53
2011-03-14 10:56:00
2011-03-14 11:04:11
2011-03-14 11:18:15
From: i luffs yewwSounds like a good idea :)
Why just increase the wait? :x The most logical thing to do, in my opinion, is just to do something easy like make a TPA of the first found yellow point in each box and then if that TPA has changed, the numbers have been updated. That would only add a few lines and would make it so lag doesn't matter.
2011-03-15 01:03:07
From: i luffs yeww
Why just increase the wait? :x The most logical thing to do, in my opinion, is just to do something easy like make a TPA of the first found yellow point in each box and then if that TPA has changed, the numbers have been updated. That would only add a few lines and would make it so lag doesn't matter.
2011-03-15 01:06:11
2011-03-15 11:17:35
2011-03-15 15:53:10
2011-03-15 17:29:51
function InPin(Pin: string): Boolean;
var
Tx, Ty, X, Y, H, I, J, Tries, ColorCount : Integer;
Boxes: array of TBox;
begin
Result := False;
if not PinScreen then Exit;
if (GetNumbers(Pin) <> Pin) then
begin
srl_Warn('InPin', '''' + Pin + ''' is not a valid Pin', warn_AllVersions);
Exit;
end;
if (Length(Pin) <> 4) then
begin
srl_Warn('InPin', 'Pin must be 4 digits long', warn_AllVersions);
Exit;
end;
Boxes := [IntToBox(37, 107, 100, 170), IntToBox(127, 107, 190, 170), IntToBox(217, 107, 280, 170), IntToBox(307, 107, 370, 170),
IntToBox(37, 179, 100, 242), IntToBox(127, 179, 190, 242), IntToBox(217, 179, 280, 242),
IntToBox(37, 251, 100, 314), IntToBox(127, 251, 190, 314), IntToBox(217, 251, 280, 314)];
while PinScreen do
begin
for I := 1 to 4 do
begin
if not PinScreen then Break;
ColorCount := CountColorTolerance(clWhite, 150, 80, 380, 100, 10);
// Counts the "Now click the NUM_X digit.". This is used later on.
GetMousePos(X, Y);
if (FindText(Tx, Ty, Pin[I], UpChars, 30, 100, 383, 319)) then
begin
H := High(Boxes);
for J := 0 to H do
if IntInBox(Tx, Ty, Boxes[J]) then
begin
with Boxes[J] do
if PinScreen then
MouseBox(x1, y1, x2, y2, 1);
Break;
end;
end else
begin
H := High(Boxes);
for J := 0 to H do
if IntInBox(X, Y, Boxes[J]) then
begin
with Boxes[J] do
if PinScreen then
MouseBox(x1, y1, x2, y2, 1);
Break;
end;
end;
Wait(100);
while (CountColorTolerance(clWhite, 150, 80, 380, 100, 10) = ColorCount) do
Wait(500);
if BankScreen then
begin
Result := True;
Exit;
end;
end;
WaitFunc(@BankScreen, 50, 300);
ClickContinue(True, True);
while not FindColor(Tx, Ty, 0, 7, 460, 69, 474) do
begin
Wait(500);
if not LoggedIn then
Exit;
end;
Inc(Tries);
if Tries > 2 then
begin
srl_Warn('InPin', '''' + Pin + ''' is not the correct Pin', warn_AllVersions);
ClosePinScreen;
Exit;
end;
end;
Result := BankScreen;
end;mar 15 18:28:37 2011
@@ -115,7 +115,7 @@
*******************************************************************************}
function InPin(Pin: string): Boolean;
var
- Tx, Ty, X, Y, H, I, J, Tries : Integer;
+ Tx, Ty, X, Y, H, I, J, Tries, ColorCount : Integer;
Boxes: array of TBox;
begin
Result := False;
@@ -141,6 +141,10 @@
for I := 1 to 4 do
begin
if not PinScreen then Break;
+
+ ColorCount := CountColorTolerance(clWhite, 150, 80, 380, 100, 10);
+ // Counts the "Now click the NUM_X digit.". This is used later on.
+
GetMousePos(X, Y);
if (FindText(Tx, Ty, Pin[I], UpChars, 30, 100, 383, 319)) then
begin
@@ -166,7 +170,9 @@
end;
end;
- Wait(200+Random(100)); // Had to add a wait here because humans aren't that fast.
+ Wait(100);
+ while (CountColorTolerance(clWhite, 150, 80, 380, 100, 10) = ColorCount) do
+ Wait(500);
if BankScreen then
begin
@@ -1243,4 +1249,4 @@
end else
Writeln('Could not find the deposit box');
end;
-end;
\ No newline at end of file
+end;
2011-03-24 23:59:29
2011-03-25 00:46:05
2011-03-25 01:58:11
From: ggzz
Hey I noticed this aswell as the one where sometimes it types the username and password in the Username box and never logs you in unless you disable it and login manually or restart the script.
2011-03-25 02:15:18
2011-03-25 02:17:08
From: Flight
I'm going to give Zyt3x's a shot soon, I'll have to simulate some lag to see if it really is a fix. I suppose loading multiple youtube videos would do the trick. :p I'll let ya know after wards how it turns out.
2011-03-25 02:24:21
From: Baked0420
I just changed the wait(200+random(100)) to wait(400+random(300)), not because my computer was lagging, but it was too quick to seem human and sometime after clicking the fourth number, it'd go to click the first number again thinking the pin screen stayed open from entering the wrong pin. So the extra 200 ms helped make it not do that for me and looks more human in my opinion between clicking numbers.
2011-03-25 03:05:42
2011-03-25 04:23:43
From: FlightI added a color check to make sure that the client had updated before it clicked a number :)
Zyt3x's worked fine for me, I'm not really sure what what the changes were that he made, and I couldn't really 'lay' on a heavy amount of lag at the time, but it worked successfully when I tried.
2011-03-25 05:03:41
2011-03-25 08:40:40
From: Narcle
What Zytex did was what I was thinking. I personally don't like to rely on 'waits' to continue a function. Always good to have a repeating loop of a wait to confirm the next step.
From: Flight
Yeah I have the same problems with this as well. I think the smartest fix for this is to get rid of the wait between inputting the different pin numbers, and instead go by the pin number displayed at the top of the screen. ("…Choose the SECOND number…") That way we know we're ready to click the next number.
2011-03-25 12:06:47
From: FlightYes, that would work too :)
@Zyt3x: Smart :p I was gonna suggest using the OCR to grab the text at the top of the pin screen(that tells you which number order you're on), and going from there.
2011-03-26 19:35:51