Jump to content
Sign in to follow this  

Sudden error in <INetSMTPMailCom.au3>

Recommended Posts


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

Func _OCR($file)

Dim $miDoc, $Doc, $str, $oWord

Dim $OutputString = ""

$oMyError = ObjEvent("AutoIt.Error", "_CoMErrFunc")

$miDoc = ObjCreate("MODI.Document")

$miDocView = ObjCreate("MiDocViewer.MiDocView")


$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


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


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


Share this post

Link to post
Share on other sites

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

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.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.