Nufineek
01-31-2014, 09:51 PM
Hey guys, I have a simple question. What function would you use to recognise a number from Tbox on my rs3 screen and return it as a result into my script?
Ashaman88
01-31-2014, 10:02 PM
tesseract or fonts... but show a picture please
Nufineek
01-31-2014, 10:25 PM
tesseract or fonts... but show a picture please
I'd need it to recognise this collon at GE screen
22834
I'd need it to recognise this collon at GE screen
22834
Using tesseract, something like:
function GEPrice(Bounds: TBox): String;
begin
result := tesseractGetText(Bounds.x1,Bounds.y1,Bounds.x2,Bou nds.y2,5,5,false,0,'')
end;
Change the scaling parameters as required. Or you can dynamically grab bounds by search for colours and returning TPA bounds.
EDIT: Realised you want just numbers.
try
function GEPrice(Bounds: TBox): Integer;
var
Text: String;
begin
Text := tesseractGetText(Bounds.x1,Bounds.y1,Bounds.x2,Bou nds.y2,5,5,false,0,'');
result := StrToIntDef(ExtractFromStr(Text, Numbers), 0);
end;
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.