And the reason that you might be still getting that error is because even if the proc & window exsit doesn't mean that between those checks and the object call that RR could be shutting down and would still cause the error. Though a very small window, still wiggle room for it to occur.Code:; ; This info can be found in the autoit help file under the ObjEvent ; ;you can globaly define this $oRR_Error = ObjEvent("AutoIt.Error","MyErrFunc") Func MyErrFunc() Switch $oRR_Error.number Case 169,-2147220994 ; If either the object doesn't exsits or it can't be created Exit Case Else ;If its not either of the above two error display a msgbox telling what the error was ;If its an error you want to trap as well, write down the number and add it to either ;the above case statement or to its own and do what ever you need to do when that error occurs. 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 ) EndSwitch Endfunc



LinkBack URL
About LinkBacks
Reply With Quote


.
Bookmarks