Jump to content

Recommended Posts

Hi,

Can you help me for the following error:

"Variable must be of type "Object".

i want to run 'submiteaze' softare ,which is installed at (C:/submiteaze)

i used the code

$oSubmiteaze=ObjCreate("SubmitEaze.Application")

$oSubmiteazeEvent=ObjEvent("$oSubmiteaze","SubmitEaze")

$oError = ObjEvent("AutoIt.Error","MyErrFunc")

If Not $oSubmiteaze.Client.IsRunning Then

$oSubmiteaze.Client.Start()

EndIf

but it shows the error "Variable must be of type "Object".

Link to post
Share on other sites
  • 2 weeks later...

Add missing error handling to see COM errors.

You can use ConsoleWrite or MsgBox

; User's COM error function. Will be called if COM error occurs
Func MyErrFunc($oError)
MsgBox('COM Error', "err.number is: " & @TAB & $oError.number & @CRLF & _
"err.windescription:" & @TAB & $oError.windescription & @CRLF & _
"err.description is: " & @TAB & $oError.description & @CRLF & _
"err.source is: " & @TAB & $oError.source & @CRLF & _
"err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
"err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
"err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
"err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
"err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF)
SetError(1)
EndFunc

Then you can test @error after ObjCreate() like this

$oSubmiteaze=ObjCreate("SubmitEaze.Application")
If @error then ...
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...