SRL Archive - Help

Can't find text


Lance

2011-03-06 13:02:32

I was asking for help on this project before but I've decided to just start a new thread to keep things simple.

I need the script to be able to read numbers, here's an example of zero:
first image is the origional, second is it blown up, third I went into paint and filled in just the solid green with white.

Now I noticed in this tutorial by Shuttleu, the runescape font is very thin and only has a simple black shadow where my font is big and thick and has blue-green, yellow-green, blue and yellow on it's outline.

I've had no success getting my script to recognize and read the text in this font, is it just not possible because my font is to big and has a strange outline?

Wizzup?

2011-03-06 14:25:30

It should certainly be possible. Can we see your attempts at doing so?

Lance

2011-03-06 15:01:37

From: Wizzup?
It should certainly be possible. Can we see your attempts at doing so?


Certainly, thanks for the speedy response.

This is my script


program New;
{.include YPP/YPP.scar}
{.include DTM.scar}

function FindText(var cx, cy: Integer; txt: string; font, xs, ys, xe, ye: Integer): Boolean; //by Stupid3ooo
var
S: Integer;
begin
S := CreateBitmapMaskFromText(txt, font);
if (xs < 0) then xs := 0;
if (ys < 0) then ys := 0;
Result := FindBitmapMaskTolerance(S, cx, cy, xs, ys, xe, ye, 10, 30);
FreeBitmap(S);
end;

var
x, y, A, B, C, D, Font : Integer;
begin
ActivateClient();
SetupYPP();

Font := LoadChars2('C:\Program Files\SCAR 3.22\Fonts\PokerChars\');
if FindText(x, y, '0', Font, 0, 0, 500, 500) then Writeln(IntToStr(x) + ', ' + IntToStr(y));

Writeln(IntToStr(x) + ', ' + IntToStr(y));
end.

And this is the image named "48.bmp"


Lance

2011-03-07 20:21:42

bump. 60 views and no one knows why this isn't working? :P

Edit: I'm using scar as well, is scar outdated maybe?

Wizzup?

2011-03-08 10:59:10

http://docs.wizzup.org/simba/scriptref/ocr.html