Jump to content



Photo

OnAutoItErrorRegister - Handle AutoIt critical errors


  • Please log in to reply
25 replies to this topic

#1 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 19 March 2011 - 10:57 PM

AutoIt Version: 3.3.6.1+
UDF Version: 1.8

Description: This library allows to register function for AutoIt critical errors.
Usualy it's syntax errors, or array-related errors.
By default the UDF shows custom debug dialog, although it is not possible to perform any real debugging, but we can for example display the error message, restart application, send bug report, or just close the application.

Syntax and parameters:
Spoiler



Example #1 - Displaying built-in dialog when error is received:
Spoiler


Example #2 - Call user defined function when recieving error (script restart):
Spoiler


Attachments:
Attached File  OnAutoItErrorRegister_1.7.zip   6.88K   726 downloads
Attached File  OnAutoItErrorRegister_1.6b.zip   6.75K   242 downloads
Attached File  OnAutoItErrorRegister_1.6.zip   6.71K   200 downloads
Attached File  OnAutoItErrorRegister.zip   6.63K   184 downloads

Download: OnAutoItErrorRegister.zip (Counter: Posted Image)

Screenshot:
Posted Image

ChangeLog:
Spoiler


Initial idea by jennico: AutoIt Error Handler and Debugger
Author(s): G.Sandler (MrCreatoR), jennico


Notes:
  • StdOut method ($bUseStdOutMethod = True) is not compatible with CUI mode.
  • When using "error window catching" method ($bUseStdOutMethod = False), the error window blinks on the screen for a few milliseconds.
  • This UDF executes additional process to monitor for errors, or, if to be more specific, original copy of a process used as a monitor module, and the main script (the code that should be executed) executed as additional process, then initial/original process monitors this copy of process.
  • If you are using _OnAutoItErrorUnRegister when $bUseStdOutMethod = True, then standard AutoIt error message will not be displayed.
  • To use the "Send bug report" feature, there is need to fill related parameters (variables) under the «User Variables» section in UDF file (check the comments of these variables), or just build your own user function.

Edited by MrCreatoR, 18 October 2012 - 02:42 PM.

  • Sunaj, JScript and syk3s like this
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team






#2 ivan

ivan

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 398 posts

Posted 20 March 2011 - 03:28 AM

Very useful. Thx for sharing. I see your library deals with autoit syntax errors as well as COM errors. I liked the extra functionality like reporting, debugging and restarting.

I took a look at the function _OnAutoItErrorRegister and I wonder if your library will work on compiled scripts in systems where Autoit has not been installed? All my computers have autoit installed, so I can't really test this unless I uninstall autoit.

I've played with the idea of a general COM object error handling function for a while, in an attempt to implement different procedures according to the object that triggered the error. I must have made at least 3 unsatisfactory attempts and have always deferred further development because each time I encountered conflicting issues. That is the main reason why I've not posted anything before, but I'm very interested to see if and how you deal with them.

Regards,
IVAN

#3 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 20 March 2011 - 09:47 AM

I see your library deals with autoit syntax errors as well as COM errors

No no, the COM error handling is for the email sending function. I should move it to the function itself.
To handle COM errors there is ObjEvent, it should be used seperatly for each object.

I wonder if your library will work on compiled scripts in systems where Autoit has not been installed?

Ofcourse it will, i can't see a reason why not.
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#4 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 20 March 2011 - 10:20 AM

Updated.

[1.6]
* Fixed an issue with COM errors catching (this UDF should not handle COM errors, it was just for sending email function).
* Removed unneccessary #include <File.au3>.


Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#5 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 26 March 2011 - 04:23 PM

Another small update:

* Fixed bug with auto-ckicked buttons on Windows Vista/7.


Version not changed.
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#6 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 26 March 2011 - 04:36 PM

Sorry, the 1.6 file was not updated, it's called 1.6b now, if anyone has been downloaded 1.6 after i posted my last message, please download the 1.6b again.
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#7 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 8,842 posts

Posted 26 March 2011 - 08:02 PM

Its really good this, thanks for sharing it. :)

I'm not overly fond of having my email and password in with a script I might pass to someone though, but I suppose its not difficult to create an email just for a certain project.

I've often wondered if there were a viable way of determining the function (if its in one) from where the script crashed.

Anyhow, using your example I tried a number of ways including variables and dllstructs and also enviroment variables, all to no avail.

In the end I tried the console stream, and here the result.

AutoIt         
#include <OnAutoItErrorRegister.au3> Global $a[4] _OnAutoItErrorRegister("", "", "My App Error") GUICreate("OnAutoItErrorRegister Example", 350, 200) GUICtrlCreateLabel("This script is just an example." & @LF & @LF & "It will produce a syntax error in", 25, 40, 300, 50) GUICtrlCreateLabel("5", 185, 50, 50, 40) GUICtrlSetColor(-1, 0xF20000) GUICtrlSetFont(-1, 30, 800, 0, 'Tahoma') GUICtrlCreateLabel("seconds.", 220, 67, 300, 50) GUICtrlCreateLabel("The result shown as a CUSTOM error message, you can change it!", 25, 120, 350, 80) GUICtrlCreateLabel("Copyright jennico, G.Sandler (MrCreatoR) © 2008 - 2011", 25, 170, 350, 80) GUICtrlSetColor(-1, 0x808080) GUICtrlSetFont(-1, 8.5, 800, 6) GUISetState() For $i = 5 To 1 Step -1     GUICtrlSetData(4, $i)     $iTimer = TimerInit()     While TimerDiff($iTimer) < 1000         If GUIGetMsg() = $GUI_EVENT_CLOSE Then             Exit             ;ExitLoop 2         EndIf     WEnd Next _1() _2() _3() _1() _2() _3() _1() _2() _3() _4() _2() _3() _1() _2() _3() Func _1()     ConsoleWrite("_1" & @CRLF) EndFunc   ;==>_1 Func _2()     ConsoleWrite("_2" & @CRLF) EndFunc   ;==>_1 Func _3()     ConsoleWrite("_3" & @CRLF) EndFunc   ;==>_1 Func _4()     ConsoleWrite("_4" & @CRLF)     MsgBox(0, "", $a[6]) ;We deliberately make an array subscript error! (so it will compile for testing) EndFunc   ;==>_1


The idea is to consolewrite upon entering each function, the function which errors is the last function used and so we narrow our debugging down. I know there are cons to this, such as extra time in functions etc.. But to me its worth it.

I have a question if someone can answer it.

I tried to use consoleread before the write to remove the last line fron stream, except it did not work, so will this cause memory error/leak.

Also anyone care to donate a regexp :) to get the last function, so it can be added to the 'view bug report'?

EDIT:
the last few functions are seen in the 'send bug report' gui

Edited by JohnOne, 26 March 2011 - 08:06 PM.

AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)

#8 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 26 March 2011 - 08:10 PM

I'm not overly fond of having my email and password in with a script I might pass to someone though, but I suppose its not difficult to creat an email just for a certain project.

Me too, but we can encrypt the password :)

I've ofter wondered if there were a viable way of determining the function (if its in one) from where the script crashed.

For that purpose i have AutoItScript Add Debugger.
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#9 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 8,842 posts

Posted 26 March 2011 - 08:36 PM

Thats quite cool that MrCreator.

I've been running it for a few minutes and noticed that the working set memory keeps going up and up, more noticable in your test script when the sleep loop is set to 10.

Very handy for debugging

Yoink !! :)

<puts in box>
AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)

#10 Fran

Fran

    Adventurer

  • Active Members
  • PipPip
  • 125 posts

Posted 31 March 2011 - 10:35 AM

Hi there,

I have added this to my script, but when it calls the function "OnAutoItErrorRegister", my script exits without warning, error or reason.

All I did was to add 2 lines to my script:
#include <OnAutoItErrorRegister.au3>
_OnAutoItErrorRegister("", "", "My App Error")

Any ideas as to why this would happen and how to fix it?

#11 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 26 May 2011 - 09:52 PM

All I did was to add 2 lines to my script:

And what about the first example in the first post, is it working?

What AutoIt version you are using?
And also it would be better to see the whole script.
Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#12 MrCreatoR

MrCreatoR

    Must AutoIt!

  • MVPs
  • 3,241 posts

Posted 26 May 2011 - 10:00 PM

Update...

[1.7]
* Fixed an issue with showing tray icon even if #NoTrayIcon is specified in the main script.
* Fixed an issue with not passing the original command line parameters to the main script.
Now added /OAER parameter to the command line at the end, it's an identifier for OnAutoItErrorRegister UDF.


Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

Posted Image AutoIt Russian CommunityPosted Image Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramPosted Image UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDFPosted Image Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating Posted Image)* === My topics === *

==========================================================Posted Image==========================================================

AutoIt is simple, subtle, elegant. © AutoIt Team


#13 wesdegroot

wesdegroot

    Seeker

  • Active Members
  • 20 posts

Posted 03 February 2012 - 07:05 PM

AutoIt Version: 3.3.6.1
UDF Version: 1.7

Description: This library allows to register function for AutoIt critical errors.
Usualy it's syntax errors, or array-related errors.
By default the UDF shows custom debug dialog, although it is not possible to perform any real debugging, but we can for example display the error message, restart application, send bug report, or just close the application.

Syntax and parameters:
[spoiler]Syntax:

_OnAutoItErrorRegister ([$sFunction [, $vParams [, $sTitleMsg [, $sErrorMsgFormat [, $bUseStdOutMethod]]]]])
.....

if i close my gui then i got an error, application crashed restart now?

#14 Virgilio1

Virgilio1

    Seeker

  • Active Members
  • 13 posts

Posted 17 February 2012 - 08:00 PM

The _OnAutoItErrorRegister is incompatible
with this script
If _Singleton("RinominaIncarichi", 1) = 0 Then MsgBox(0, "Attenzione", "Il Programma è gia in esecuzione") Exit EndIf


Why ?

#15 CooperWu

CooperWu

    Seeker

  • New Members
  • 3 posts

Posted 22 March 2012 - 12:54 PM

I just want to report this problem. :oops:

The _OnAutoItErrorRegister is incompatible
with this script

If _Singleton("RinominaIncarichi", 1) = 0 Then MsgBox(0, "Attenzione", "Il Programma è gia in esecuzione") Exit EndIf


Why ?



#16 subzerostig

subzerostig

    Seeker

  • Active Members
  • 34 posts

Posted 22 March 2012 - 04:36 PM

When I first saw this feature and tested it out it seemed great. There is one big massive problem, it messes up my script. I found that depending on where I placed the function, splashtext/image would double up and not go away. I also found that variables were suddenly not being declared despite the fact that they were being declared on line 1.

I'm sorry, but I cannot use this UDF, until these major glitches are fixed

Edited by subzerostig, 22 March 2012 - 07:17 PM.

There are 10 types of people in this world. Those that understand binary, and those that do not

#17 zpanderson

zpanderson

    Seeker

  • Active Members
  • 30 posts

Posted 18 July 2012 - 07:17 PM

I think this is a great function and I've been using it in my recent scripts. I do however have one problem. I want a user input (inputbox) to be above my declaration of onautoiterrorregister so that I can then use that variable. My issue is that this inputbox now opens twice. Is there a way around this?

Thanks!

#18 Shinies

Shinies

    Adventurer

  • Active Members
  • PipPip
  • 100 posts

Posted 11 September 2012 - 06:35 AM

Hi MrCreatoR,

Cool script! This is something i certainly needed and saved me a bunch of time coding!

One possible bug:

93: Global $sOAER_BugReportSent_Msg = "Please fill all requiered fields" 396: If $iError Then MsgBox(16, $sOAER_SendBugReport_Title & " - " & $sOAER_Error_Title, _ StringFormat($sOAER_UnableToSend_Msg, $oOAER_ErrorData[0], $oOAER_ErrorData[1]), 0, $hSndBugRprtGUI) Else MsgBox(64, $sOAER_SendBugReport_Title & " - " & $sOAER_Success_Title, $sOAER_BugReportSent_Msg, 0, $hSndBugRprtGUI) 401: EndIf


Seems to me like even when successful sending email, it will tell the user to fill all required fields?

Hope that helps and thanks again,

Smerk

#19 PhoenixXL

PhoenixXL

    Be what you are, believe me its always the BEST...

  • Active Members
  • PipPipPipPipPipPip
  • 1,325 posts

Posted 11 September 2012 - 02:41 PM

cool
works great
the Idea of Debugging the Script is great.. :)

Is it possible to debug a compiled script | Exe
By maybe
decompiling and substituting the incorrect parameter
with the correct parameter and then again recompiling and replacing the original Exe

I apolizise if i break the rules

Edited by PhoenixXL, 11 September 2012 - 02:42 PM.

PredictText: Predict Text of an Edit Control Like Scite. | Remote Gmail: Execute your Scripts through Gmail. | StringRegExp: Share and learn RegExp. | Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). | Database: An easier approach for _SQ_LITE beginners. | MathsEx: A UDF for Fractions and LCM, GCF/HCF. | FloatingText: An UDF for make your text floating. | Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead.

#20 Belini

Belini

    Polymath

  • Active Members
  • PipPipPipPip
  • 242 posts

Posted 15 September 2012 - 12:53 PM

I changed the UDF to generate an error report and restart the script error when encountering a problem over there and it worked well but the script is open 2 times how to solve this?

Attached File  OnAutoItErrorRegister_changed.rar   2.84K   46 downloads
Posted ImageAutoit Forum Brazil: http://autoitbrasil.com/ >> Autoit and arcades: http://www.arcadebr.com/forumMy Codes:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users