SRL Archive - RS3 Help

recognise numbers?


Nufineek

2014-01-31 16:51:22

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

2014-01-31 17:02:01

tesseract or fonts… but show a picture please

Nufineek

2014-01-31 17:25:56

From: Ashaman88
tesseract or fonts… but show a picture please

I'd need it to recognise this collon at GE screen
[ATTACH=CONFIG]22834[/ATTACH]

sdf

2014-01-31 22:24:28

From: Nufineek
I'd need it to recognise this collon at GE screen
[ATTACH=CONFIG]22834[/ATTACH]


Using tesseract, something like:


function GEPrice(Bounds: TBox): String;
begin
result := tesseractGetText(Bounds.x1,Bounds.y1,Bounds.x2,Bounds.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,Bounds.y2,5,5,false,0,'');
result := StrToIntDef(ExtractFromStr(Text, Numbers), 0);
end;