bbehnke Posted December 20, 2013 Posted December 20, 2013 Hello everyone, I am writing a program that opens Internet Explorer then does manipulations from there. I keep getting a COM error with these details. The error is occurring on a compiled .exe version of the script, but not in the Scite debugging when you press "Go". err.description is: err.windescription: err.number is: 80020009 err.lastdllerror is: 0 err.scriptline is: -1 err.source is: err.helpfile is: err.helpcontext is: 0 Here is the error catch I am using and the problematic code. COM error catch: #include <Excel.au3> #include <File.au3> #include <Array.au3> #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <DateTimeConstants.au3> #include <WinAPI.au3> #include <Timers.au3> $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler ; This is my custom defined error handler Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Endfunc Where error is occurring (I did some troubleshooting and narrowed it down to these three lines): ;opening and manipulating IE Global $oIE = _IECreate("https://login.advancedmd.com/") WinWaitActive("AdvancedMD – Client Login - Windows Internet Explorer") WinSetState("AdvancedMD – Client Login - Windows Internet Explorer", " ", @SW_MAXIMIZE) Basically when the script runs it opens Internet explorer to the correct site, it then throws the COM error message box. Then if I click "Okay" on the COM error message box it will then proceed to maximize the window and perform the rest of the script correctly. I tried it without the COM error catch (maybe it was a false positive situation) and I still received an "autoit object" error from windows. I also threw and "Exit" prior to IE opening and did not receive an error prior to exiting. So I am pretty sure this is the culprit. Any help would be great! I am at the point where I would like to put this .exe on some other computers and this is hindering that step. Thank you everyone! Brad
coffeeturtle Posted August 21, 2014 Posted August 21, 2014 Possibly you are using Remote Desktop to the target machine? That is one scenario where I've seen that error code.
Danp2 Posted August 21, 2014 Posted August 21, 2014 Seems like I've seen something similar posted on the forum previously. I'm wondering if it has to do navigating to a secure site during the IE object creation. Latest Webdriver UDF Release Webdriver Wiki FAQs
JohnOne Posted August 21, 2014 Posted August 21, 2014 If so... Global $oIE = _IECreate("about:blank") _IENavigate(...) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Danp2 Posted August 22, 2014 Posted August 22, 2014 That's what I was thinking as well. Then I took a look at the innards of _IECreate and found that this is exactly what is already occurring. Latest Webdriver UDF Release Webdriver Wiki FAQs
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