Hey there
some times in a big script like mine, unpredictable errors come out and crashes it, is there anyway to handle any error in the script with a message box or event instead of viewing an "AutoIt error" and closing the application?
I hope so, thank you.
Here is an example how to translate error message:
#include <Array.au3>
#include <WinApi.au3>
#include <MsgBoxConstants.au3>
If $IDYES = MsgBox($MB_YESNO, 'Make a decision', 'Do you want to inercept error ?') Then
AddHookApi("user32.dll", "MessageBoxW", "Intercept_MessageBoxW", "int", "hwnd;wstr;wstr;uint")
EndIf
_Example()
Func _Example()
;~ _ErrorTranslator(Default) ; check your translation