Jump to content
Sign in to follow this  
IndyUK

Sudden error in <INetSMTPMailCom.au3>

Recommended Posts

IndyUK

I incorporated the following OCR code to detect some text in a bitmap.

CODE
Func _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 $OutputString

EndFunc ;==>_OCR

However, 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")

EndIf

Can anyone see what might be the problem? If I run the above in a script without the INetSMTPMailCom.au3 it runs as expected.

Thanks

Share this post


Link to post
Share on other sites
IndyUK

This isn't enough information to determine what could be wrong.

What else would you need?

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×