View Full Version : Does Simba have Text Recognition?
Robot91292
03-26-2012, 05:55 AM
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.
http://i40.tinypic.com/34erhxj.jpg
Janilabo
03-26-2012, 05:58 AM
Yes it does.
Check THIS (http://docs.villavu.com/simba/scriptref/ocr.html) out.. (Link to Simba documentation) :)
Robot91292
03-26-2012, 06:07 AM
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 http://i39.tinypic.com/msdrsy.png
Robot91292
03-26-2012, 06:08 AM
Thank you for the fast reply!!!
Robot91292
03-26-2012, 06:19 AM
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
You can check my guide here (http://villavu.com/forum/showthread.php?t=78116)
About half way down, under the 'functions needed' sub-heading I explain how to use that function.
Robot91292
03-26-2012, 07:03 AM
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.
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 http://i39.tinypic.com/msdrsy.png
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
03-26-2012, 02:35 PM
I thought Simba had OCR (Optical Character Recognition), so couldn't we just use the fonts required for that?
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
03-26-2012, 07:21 PM
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
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.