SRL Archive - Help

Does Simba have Text Recognition?


Robot91292

2012-03-26 01:55:26

So my Goal here is to make Simba Preview a picture, Recognize a small bit of text, Like a name and or number, then be able to type that into a textbox. This is not runescape related so "UpText" won't work.

Thanks in Advance!

-Rob

PS this is what the Image would look like.


Janilabo

2012-03-26 01:58:18

Yes it does.

Check THIS out.. (Link to Simba documentation) :)

Robot91292

2012-03-26 02:07:19

Also another question. I want the bot to open each of these files. Is there a way of scripting it to do that withought having to code in each coordinate placemant in which the file is to be clicked? Maybe like after it clicks one then it moves down 10 pixels or whatever it is to click the next one?

Here is what that looks like

Robot91292

2012-03-26 02:08:24

Thank you for the fast reply!!!

Robot91292

2012-03-26 02:19:27

I'm a bit confused as this is quite a difficult procedure. Any examples of this would be greatly appreciated. And if you could revolve the example around the Font and Spacing of the OP Image that would be a bonus!

GetTextAtEx(const xs,ys,xe,ye, minvspacing, maxvspacing, hspacing,color, tol: integer;const font: string): string;

-Rob

Abu

2012-03-26 02:24:53

You can check my guide here

About half way down, under the 'functions needed' sub-heading I explain how to use that function.

Robot91292

2012-03-26 03:03:41

I got it to compile successfully! Thank you for that. But now Since I'm not doing this for a video game. I need to figure out how to take the information that was read and put it somewhere on the screen.

Sex

2012-03-26 03:06:25

From: Robot91292
Also another question. I want the bot to open each of these files. Is there a way of scripting it to do that withought having to code in each coordinate placemant in which the file is to be clicked? Maybe like after it clicks one then it moves down 10 pixels or whatever it is to click the next one?

Here is what that looks like



var
Files : TStringArray;
i : integer;
begin
Files := GetFiles('C:\Path\To\Files\', 'bmp');
for i := 0 to high(Files) do
OpenWebPage('C:\Path\To\Files\' + Files[i]);
end.
Should work fine :).

Ibotlots8D

2012-03-26 10:35:27

I thought Simba had OCR (Optical Character Recognition), so couldn't we just use the fonts required for that?

Sex

2012-03-26 15:16:21

From: Ibotlots8D
I thought Simba had OCR (Optical Character Recognition), so couldn't we just use the fonts required for that?


That has already been stated, OP has been given a link to the OCR documentation. You can use a normal Windows font with it as well.

LordJashin

2012-03-26 15:21:54

From: Ibotlots8D
I thought Simba had OCR (Optical Character Recognition), so couldn't we just use the fonts required for that?

Yep Simba has OCR ability, note that the text reading is based off bitmaps of each particular letter. If in said picture, the font ALWAYS looks the same, no deformations, or anything. Then you can make bitmaps yourself of each of the letters. Put them in Simba/fonts/YourNewFontFolder/ then search for them there's a tutorial on it here - http://villavu.com/forum/showthread.php?t=60451

How? Multiple fonts? Sure…

Use these functions GetTextAt, FindText

If you don't understand how they work then ask