Jump to content

Update to Wrapper v.1.10.1.12 from v.1.10.1.8 creates "Variable must be of type "Object".:" error


Recommended Posts

Hi all,

I've only been using AutoIt3 for about a month now and I must say its awesome! So, I'd like to give a quick thanks in my first post to all that have been part of making it.

Anyway...I've been able to solve all problems with the help file and searching the forum until now. I had some code that has been running fine on a machine that I installed AI3 on about a month ago. Yesterday I put it on another machine and the code doesn't work. Anyway here's the code followed by the full message. (";..."=code between)

CODE
#include <GUIConstants.au3>

#include <Array.au3>

#include <WindowsConstants.au3>

#include <ScreenCapture.au3>

#include <File.au3>

;...

Dim $miDoc, $Doc

;...

;take screenshot

$sTargetImage = "C:\Program Files\AutoIt3\Scripts\image.jpg"

_ScreenCapture_Capture($sTargetImage, $left, $top, $right, $bottom, $fCursor = False)

$miDoc = ObjCreate("MODI.Document")

$miDocView = ObjCreate("MiDocViewer.MiDocView")

$miDoc.Create("C:\Program Files\AutoIt3\Scripts\image.jpg") ;<------- Error here: 'Variable must be of type "Object".:'

$miDoc.Ocr(9, True, False)

The error occurs on the 2nd to last line and it says exactly: 'Variable must be of type "Object".:'

I started to try to go back to the earlier version v.1.10.1.8, but that doesn't really solve my problem in the long run. Was there a change to the way Objects are used? I don't see any changes in the help file regarding this.

If I missed a post about this subject, I apologize. Please forward me to it.

Thanks,

jms

Link to comment
Share on other sites

Hi all,

I've only been using AutoIt3 for about a month now and I must say its awesome! So, I'd like to give a quick thanks in my first post to all that have been part of making it.

Anyway...I've been able to solve all problems with the help file and searching the forum until now. I had some code that has been running fine on a machine that I installed AI3 on about a month ago. Yesterday I put it on another machine and the code doesn't work. Anyway here's the code followed by the full message. (";..."=code between)

CODE
#include <GUIConstants.au3>

#include <Array.au3>

#include <WindowsConstants.au3>

#include <ScreenCapture.au3>

#include <File.au3>

;...

Dim $miDoc, $Doc

;...

;take screenshot

$sTargetImage = "C:\Program Files\AutoIt3\Scripts\image.jpg"

_ScreenCapture_Capture($sTargetImage, $left, $top, $right, $bottom, $fCursor = False)

$miDoc = ObjCreate("MODI.Document")

$miDocView = ObjCreate("MiDocViewer.MiDocView")

$miDoc.Create("C:\Program Files\AutoIt3\Scripts\image.jpg") ;<------- Error here: 'Variable must be of type "Object".:'

$miDoc.Ocr(9, True, False)

The error occurs on the 2nd to last line and it says exactly: 'Variable must be of type "Object".:'

I started to try to go back to the earlier version v.1.10.1.8, but that doesn't really solve my problem in the long run. Was there a change to the way Objects are used? I don't see any changes in the help file regarding this.

If I missed a post about this subject, I apologize. Please forward me to it.

Thanks,

jms

Well, that says $miDoc is not an object, so you can't use .Create method with it. The MODI.Document will only be available if you have a new enough version of MS Office installed. It is not native to the Windows OS. Do you still have a compatible version of Office running where you are trying this?

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Well, that says $miDoc is not an object, so you can't use .Create method with it. The MODI.Document will only be available if you have a new enough version of MS Office installed. It is not native to the Windows OS. Do you still have a compatible version of Office running where you are trying this?

;)

Oh, duh. I feel retarded. I forgot to install Office on my new computer. Thanks...The different Wrapper version was a red herring.

jms

Link to comment
Share on other sites

  • Developers

Oh, duh. I feel retarded. I forgot to install Office on my new computer. Thanks...The different Wrapper version was a red herring.

jms

The wrapper (Autoit3Wrapper) is nothing more or less that a .... wrapper.

It "facilitates" things like running au3check/tidy/obfuscator/aut2exe/autoit3/update program resources/version control(svn/cvs) and optional run program9(s) before and after it finishes..... thats all ;)

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...