Emax Posted February 12, 2012 Share Posted February 12, 2012 (edited) Why not work ???!?!?!? $oMyError = ObjEvent ( "AutoIT.Error", "MyErrFunc" ) ;Cause error Dim $a[1] For $b = 0 To 2 $c = $a[$b] Next 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 Edited February 12, 2012 by Emax Link to comment Share on other sites More sharing options...
Developers Jos Posted February 12, 2012 Developers Share Posted February 12, 2012 "Why not work" what? If you think that the ObjEvent() will also capture regular AutoIt3 errors like array subscript errors, then you are mistaken. Jos 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 More sharing options...
wakillon Posted February 12, 2012 Share Posted February 12, 2012 Try Dim $a[3] AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
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