I am a little rusty as i havent used AutoIt recently so maybe this is very easy. I have a complex script using MS office object model. I would like to detect on which line the compiled fails when run from the compiled EXE file. For example: $oOApp = 0
$oMyError = ObjEvent("AutoIt.Error","MyErrFunc")
$oOApp.CreateItem ($olMailItem)
Func MyErrFunc()
MsgBox (0,"We intercepted an Error" & @ErrorLine ,$oMyError.description& @CRLF & $oMyError.windescription,15)
Endfunc
ExitSo when i run this code i would like to get that it failed on line 3. Any idea how i can accomplish that ?