IndyUK Posted January 7, 2009 Share Posted January 7, 2009 I incorporated the following OCR code to detect some text in a bitmap.CODEFunc _OCR($file) Dim $miDoc, $Doc, $str, $oWord Dim $OutputString = "" $oMyError = ObjEvent("AutoIt.Error", "_CoMErrFunc") $miDoc = ObjCreate("MODI.Document") $miDocView = ObjCreate("MiDocViewer.MiDocView") $miDoc.Create($file) $miDoc.Ocr(9, True, False) $miDocView.Document = $miDoc $miDocView.SetScale(1, 1) $i = 0 For $oWord In $miDoc.Images(0).Layout.Words $str = $str & $oWord.text & @CRLF $OutputString = $OutputString & $oWord.text Next Return $OutputStringEndFunc ;==>_OCRHowever, since doing so I'm now getting an error about the INetSMTPMailCom.au3 UDF.C:\Program Files\AutoIt3\Include\INetSMTPMailCom.au3 (102) : ==> Variable must be of type "Object".:I'm invoking the OCR function as follows..If StringInStr(_OCR("C:\image.bmp"), "Found:1") = True Then MsgBox(0, "Error", "More than 1 record found") EndIfCan anyone see what might be the problem? If I run the above in a script without the INetSMTPMailCom.au3 it runs as expected.Thanks Link to comment Share on other sites More sharing options...
Developers Jos Posted January 7, 2009 Developers Share Posted January 7, 2009 This isn't enough information to determine what could be wrong. 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...
IndyUK Posted January 7, 2009 Author Share Posted January 7, 2009 This isn't enough information to determine what could be wrong.What else would you need? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 7, 2009 Developers Share Posted January 7, 2009 The script portion that includes InetSmtpEmailCom.au3, set all variables needed for _InetSmtpEmailCom() and the actual line calling it. The included _InetSmtpEmailCom() func and the line that triggers the error. 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...
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