SRL Archive - Research & Development Lounge

FindBankWindow & FindPinWindow


Mr. Doctor

2009-09-28 03:52:38

FindBankWindow

Function FindBankWindow :boolean;
var win,x,y :integer;
begin
win := BitmapFromString(12, 9, 'beNplj8EKAWEYRZ9B09SfzGKKBQ' +
'uPQBakJCNiNJM0IRQ1rJSFR3fq1t2os/j67/nu158N3vfd67qGKp/' +
'EUUOEONLjrZqfiumnLv6FVojBDj1odh7HrD4v7SAcNmN3Gvw0CZ20' +
'iVCsRvB9luwqZbAAzHK4pVRYoESH5LgH3EAqwT1GkUHIF0N+cdnPB' +
'Ou9dtLvpgwCZ/sDrp9f8Q==');
result := findbitmaptolerancein(win,x,y,msx1,msy1,msx2,msy2,20);
FreeBitmap(win);
end;
Finds the bank window.

FindPinWindow.

Function FindPinWindow :boolean;
var win,x,y :integer;
begin
win := BitmapFromString(31, 14, 'beNrVksEOgCAMQ/dNcpaj8Vv3l' +
'R6WkDJWHMaDkh6aAg+2rJZj3/I6a0FlDqgIip28lV0P4baQ/wwuwE' +
'e483+BNwnAMXcQlkufjz3P5MrzdsuV40obiwofxRzJE/gcwjzr1Vu' +
'e9SosSld+jt4g0i8csHAr6VeH+Su6AESnA4A=');
result := findbitmaptolerancein(win,x,y,msx1,msy1,msx2,msy2,20);
FreeBitmap(win);
end;
Finds the pin window.

JAD

2009-09-28 04:05:51


Function BankWindow :boolean;
var win,x,y :integer;
begin
win := BitmapFromString(12, 9, 'beNplj8EKAWEYRZ9B09SfzGKKBQ' +
'uPQBakJCNiNJM0IRQ1rJSFR3fq1t2os/j67/nu158N3vfd67qGKp/' +
'EUUOEONLjrZqfiumnLv6FVojBDj1odh7HrD4v7SAcNmN3Gvw0CZ20' +
'iVCsRvB9luwqZbAAzHK4pVRYoESH5LgH3EAqwT1GkUHIF0N+cdnPB' +
'Ou9dtLvpgwCZ/sDrp9f8Q==');
result := findbitmaptolerancein(win,x,y,msx1,msy1,msx2,msy2,20);
FreeBitmap(win);
end;

Not sure what these are for, but you forgot to free the bitmaps, and the results could be really shortened. Also, taking the Find out of the name sounds better for when you do if(BankWindow)then.

Isn't BankWindow just BankScreen? Isn't PinWindow just PinScreen? There's already functions for these I believe.

Mr. Doctor

2009-09-28 04:09:22

NOOOOOOOOOOOOOOOOOOOOOOOOOOO! There's like no more functions to make anymore. Thanks for the feedback though :D

FreakyMonkey

2009-09-28 06:01:21

You can make more narrowly related functions. They dont have to be universal. The more universal they are applied in RS there's probably a working function for it in SRL.

Try making functions for certain areas that are a bit problematic or different, which can be more useful