mrpepperpotts Posted November 16, 2014 Share Posted November 16, 2014 Hey guys, Please bear with me as I'm sure this question has been asked many times already, but I've honestly tried googling/searching the forums before coming here. This is my current setup (everything has been installed new without any upgrades to previous versions of software). Windows 8 Autoit v3.3.12.0 Tesseract (Windows installer of tesseract-ocr 3.02.02 (including English language data) Triple monitor setup ---- Now I tried creating a test script from another user on the board just to see if it would run: #include <Tesseract.au3> $OCR_Result = _TesseractScreenCapture(0,"",1,1,626,148,654,167,1) But it seems there were no tesseract.au3 files in the include folder, so I went ahead and found this one: https://code.google.com/p/mu97bot/source/browse/trunk/AutoIt/Include/Tesseract.au3?r=9 There were a few other files that seemed to be missing in the autoit include folder (GDIP.au3, GDIPConstants.au3), so I just found them from the aforementioned link and added them into the include folder. I then went to run it again, and then a lot of errors popped up. Some examples are below: "C:\Program Files (x86)\AutoIt3\Include\GDIPConstants.au3"(110,33) : error: $GDIP_RLUM previously declared as a 'Const'. Global Const $GDIP_RLUM = 0.3086 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Program Files (x86)\AutoIt3\Include\GDIPConstants.au3"(111,33) : error: $GDIP_GLUM previously declared as a 'Const'. Global Const $GDIP_GLUM = 0.6094 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Program Files (x86)\AutoIt3\Include\GDIPConstants.au3"(112,33) : error: $GDIP_BLUM previously declared as a 'Const'. Global Const $GDIP_BLUM = 0.0820 "C:\Program Files (x86)\AutoIt3\Include\GDIP.au3"(5630,51) : error: _GDIPlus_PathAddClosedCurve() already defined. Func _GDIPlus_PathAddClosedCurve($hPath, $aPoints) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Program Files (x86)\AutoIt3\Include\GDIP.au3"(5712,45) : error: _GDIPlus_PathAddCurve() already defined. Func _GDIPlus_PathAddCurve($hPath, $aPoints) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Program Files (x86)\AutoIt3\Include\GDIP.au3"(5838,66) : error: _GDIPlus_PathAddEllipse() already defined. Func _GDIPlus_PathAddEllipse($hPath, $nX, $nY, $nWidth, $nHeight) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Program Files (x86)\AutoIt3\Include\GDIP.au3"(5864,58) : error: _GDIPlus_PathAddLine() already defined. Func _GDIPlus_PathAddLine($hPath, $nX1, $nY1, $nX2, $nY2) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Program Files (x86)\AutoIt3\Include\GDIP.au3"(496,37) : error: $ghGDIPDll: undeclared global variable. Local $aResult = DllCall($ghGDIPDll, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "C:\Program Files (x86)\AutoIt3\Include\Tesseract.au3"(978,124) : error: _ScreenCapture_CaptureWndClient(): undefined function. $hBitmap2 = _ScreenCapture_CaptureWndClient("", $hwnd2, $left_indent, $top_indent, -$right_indent, -$bottom_indent, False) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Users\Christopher\Desktop\...\testscreen.au3 - 184 error(s), 1 warning(s) I'm assuming its an incompatibility issue with some of the files.. So I decided to try changing my original tesseract file to the one from this link: '?do=embed' frameborder='0' data-embedContent>> And none of the previous errors popped up, but instead a different one: "C:\Program Files (x86)\AutoIt3\Include\Tesseract.au3" (134) : ==> Variable must be of type "Object".: So I tried to include an error handler (at the suggestion of some threads) ;---------------------------------------------------------------------------------------------------------- ; Com Error Handler ;---------------------------------------------------------------------------------------------------------- Func MyErrFunc($oMyError) Local $HexNumber Local $strMsg $HexNumber = Hex($oMyError.Number, 8) $strMsg = "Error Number: " & $HexNumber & @CRLF $strMsg &= "WinDescription: " & $oMyError.WinDescription & @CRLF $strMsg &= "Script Line: " & $oMyError.ScriptLine & @CRLF MsgBox(0, "ERROR", $strMsg) SetError(1) Endfunc And I get the following errors: #1) Error Number: 800401F3 / Invalid Class String / Line 132 #2) Error Number: 80004005 / Unspecified Error / Line 133 #3) Error Number: 000000A9 / Variable must be of type 'Object' / Line 134 --------------------------------------- At this point, I'm just trying to get a functional working OCR to work. If you guys can point me in the right direction as to replacing certain files or changing certain lines, I'd appreciate the help. I've noticed how quickly and thoroughly you guys answer people's questions so I'll do my best to do my part as well. I believe I've included all the needed pieces for you to help me debug this issue, but if I'm missing something, please let me know and I"ll provide it asap. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 16, 2014 Developers Share Posted November 16, 2014 What is this MU97BOT? Maybe you want to read our forum rules first. Jos 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. Link to comment Share on other sites More sharing options...
mrpepperpotts Posted November 16, 2014 Author Share Posted November 16, 2014 It seemed to be the most relevant search result on google under the keyword "autoit tesseract.au3" as it was the 3rd result and under the domain code.google.com. I took a look at the forum rules, and don't think I'm breaking any particular rules. If I did, I apologize. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 16, 2014 Developers Share Posted November 16, 2014 (edited) It seemed to be the most relevant search result on google under the keyword "autoit tesseract.au3" as it was the 3rd result and under the domain code.google.com. I took a look at the forum rules, and don't think I'm breaking any particular rules. If I did, I apologize.i am sure you understood why i made the comment.... Jos Edited November 16, 2014 by Jos 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. Link to comment Share on other sites More sharing options...
mrpepperpotts Posted November 16, 2014 Author Share Posted November 16, 2014 Yeah I completely understand why you made it. Just wanted to clarify how I came about that code. Would you be able to point me in the right direction if that's not the tesseract.au3 file I should be using? Link to comment Share on other sites More sharing options...
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