SRL Archive - Senior Scripts and Snippets

OpenBankQuiet and PinScreen


The Un-Named

2007-07-09 21:19:16

Hello SRL Devs! :) I found a small bug. If you've JUST logged on, and use OpenBankQuiet('veb');(Lets say veb anyway), and you have a pin, it will give the error: "couldnt find the bank. Exiting". This is partly due to BankScreen not detecting the PinScreen(because of different text).

The solution!
Make sure OpenBankQuiet can detect the bank pin or change "BankScreen" to:
function BankScreen: Boolean;
var
x, y: Integer;
begin
if FindColor(x, y, 2070783, 22, 31, 473, 52) then
Result := IsTextAtEx(x, y - 2, 'The Bank of', 0, upchars, True, False, 0, 0,
2070783)
else if FindColorTolerance(x, y, 2070783, 22, 31, 473, 52, 30) then
Result := IsTextAtEx(x, y - 2, 'The Bank of', 30, upchars, True, False, 0, 0,
GetColor(x, y))
else Result := FindText(x, y, 'First', upchars, 175, 80, 212, 100);
end;

And add a note to the documentation:-
This also detects PinScreen! Call PinScreen; to make sure you aren't trying to withdraw from the PinScreen!

Wizzup?

2007-07-10 03:24:58

I think it would be better to just adept openbankquiet…
BTW Findtext is VERY slow, use IsTextInAreaEx.. :)

The Un-Named

2007-07-10 20:24:06

From: Wizzup?
I think it would be better to just adept openbankquiet…
BTW Findtext is VERY slow, use IsTextInAreaEx.. :)


I copied directly from FindPin. ;)