SRL Archive - OSR Help

Read a text


Master BAW

2012-06-17 08:41:39

Hello,

I'm trying to read a text on this image…


I know I probably have to use the function "GetTextAt", but the documentation only says this:

GetTextAt

function GetTextAt(const atX, atY, minvspacing, maxvspacing, hspacing,color, tol, len: integer;const font: string): string;
A general function for reading text. Reads text at (atX, atY) with a minimal vertical spacing of minvspacing and a maximal vertical spacing of maxvspacing, the text colour should match the colour color with the given tolerance Tolerance; the length of the text is specified with len. Finally, the font to use for the identifying is specified with the fontname font.


I don't understand it 100%… Is there a tutorial about reading texts? I couldn't find one.
Anyway, I need to read the words "buy" "empty" or "sell", above the GE spots… :) How should I do this?

CephaXz

2012-06-17 08:49:21

FindText(x, y, 'Buy', UpCharsEx, MBX1, MBY1, MBX2, MBY2)

Master BAW

2012-06-17 08:55:38

From: CephaXz
FindText(x, y, 'Buy', UpCharsEx, MBX1, MBY1, MBX2, MBY2)



oh that's easy! :) IT WORKS, thanks! :D

CephaXz

2012-06-17 08:58:41

Hope you get your script done soon :D