xo_Sexy Posted December 31, 2006 Posted December 31, 2006 I have been trying to solve the overall OCR (Screen Text Capture) Problem and I have stumbled onto:http://www.screenocr.com/ This site offers two Tools.1) is a stand alone utility (Works Great -< Not Interested)2) is a Command line/ Dll package offered on 21 day trial (yea, i will fork out the coin if i can make it work!)Package found here:http://www.ScreenOCR.com/screenocrsdk.exeThe Command line utiltity included: OCRSDKcl.exe dose and AMAZING job of recgonizing all fonts. WOWbut any (Run "OCRSDKcl.exe") in AutoIt is fairly (expectly) slow so i wish to use included DLL OCRSDK.DLL CODEIs basically 1 setup function, and 3 main functions (init, read, close)Setup Function: Specs read:TextractExport TextractSuccess TextractBuildWithDialog();typedef long TextractSuccess; // success returning code for Screen OCR SDK functionsI try:$Array = DllCall("OCRSDK.DLL","long","TextractBuildWithDialog") ; VOLIA! SUCESS CODEInit Function:TextractExport TextractSuccess TextractInit();$Array2 = DllCall("OCRSDK.DLL","long","TextractInit") ; VOLIA! SUCESSCODERead Function:Textract(TextractSource(0,0,200,100),TextractDest("test.dat"), TextractDestFormat(dfVerbose | dfBol | dfEol | dfSpace | dfChar | dfFont | dfCharHex | dfCharFont))class TextractSource { public: TextractSource(); TextractSource& BmpFile(const char *bmpFileName); TextractSource& Wnd(HWND); TextractSource& Rect(int ax, int ay, int bx, int by); TextractSource& DesktopWnd(); TextractSource& TopWnd(const char *windowClass, const char *windowText); TextractSource& DeepWnd(const char *windowClass, const char *windowText); TextractSource& SubWnd(const char *windowClass, const char *windowText); TextractSource& SubDeepWnd(const char *windowClass, const char *windowText); TextractSource& FindLargestWindow(); const char *BmpFileName; // used if != NULL HWND W; // used if != NULL int AX, AY, BX, BY; // used if BmpFileName == NULL and Wnd == NULL};class TextractDest { public: TextractDest(const char *destFileName); TextractDest(); const char *FileName; // NULL if area specifeid, else dest file name void *Area; // NULL if file name specified, else memory area int AreaSize;};Ok I Am LOST!OK -> I Do know i need to use DllCall,DllStructGetPtr,DLLStructCreate, DllStructSetData and DllStructGetData howeverI am getting frustrated with the combinations i have (unsucessfully) Tried.The killer part, is this software reads the text very well. I lack the pointer knowledge to plug it together.Help?xo_SexyPS:Official Help file just gave me a headache: ScreenOCRSDK.zipWorks BEST on screen graphics. (Reads Windows database of fonts) COOL(I am hoping other have enough interest in OCR to give this a whirl)
Developers Jos Posted December 31, 2006 Developers Posted December 31, 2006 - Wrong Forum ! - SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Moderators SmOke_N Posted December 31, 2006 Moderators Posted December 31, 2006 (edited) http://www.autoitscript.com/forum/index.ph...ghlite=Textracthttp://www.autoitscript.com/forum/index.php?showtopic=30760 Edited December 31, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
BrianDrab Posted January 15, 2007 Posted January 15, 2007 I'm fairly sure that you probably found a solution by now however I thought I would mention that I had a need for OCR and have been using ScreenOCR dll with great success. If you still have questions please reply and I would be happy to assist.
Spawn Posted April 15, 2007 Posted April 15, 2007 Have You made any progress on this? Can someone please post an example on how to get this working? thanks.
nilus Posted September 12, 2007 Posted September 12, 2007 Do you have a sample code. I am desperate for a OCR Solution because the solution from ptrex is only working to 50 %. It doesnt reconniced all text. I could kill my self ... Please
ptrex Posted September 12, 2007 Posted September 12, 2007 @Maybe you can use MS office to do the job.Real OCR in AU3Regards,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
guwguw Posted October 15, 2007 Posted October 15, 2007 So far I've been doing OCR under AutoIT first with code based on IFalcon's code and then trying to get this ScreenOCR running. While IFalcon's stuff is relatively slow, it is totally reliable and 100% precise (because I have full control over characters read). The same cannot (yet?) be said about ScreenOCR: For example the letter "X" is not recognized, capital "B", "R" and the number "3" often are dropped ... Anyway, recently a friend got me back to testing ScreenOCR, which is amazingly fast - and the DLL supposedly lets us read directly from memory (while the EXE version needs to write to a file). My trouble: I'm totally inexperienced with COM and DLL access and the AutoIT help files assume already advanced knowledge. (Yes, I read the little intro, but - as much fantasy as I have, lol - I fail to recognize the basic underlying mechanics). I'll start playing with published code and see how far we can get ... until then: Does anyone have an idea of how to adjust the *.PAT (pattern) table? Has anyone had success with direct memory access / ScreenOCR?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now