Sign in to follow this  
Followers 0
rajeshontheweb

Yet Another AutoIT Error Handler

3 posts in this topic

#1 ·  Posted (edited)

Inspired by the awesome piece of AutoIT Error Handler by Jennico

This piece of modification just gives you an extension box at the bottom of the GUI which will show the error in detail

Posted Image

#region;------- Autoit Error Handler launcher

;############################################################################
;   1st part (launcher) copy in first line of your program
;############################################################################

If StringInStr($cmdlineraw,"*")=0 Then
    Opt("TrayIconHide",1)
    If @Compiled Then
        $x=Run(@ScriptName&" *")
    Else
        $x=Run('"Autoit3.exe" "'&@ScriptFullPath&'" *')
    EndIf
    ProcessWait($x,5)
    While ProcessExists($x)
        If WinActive("AutoIt Error") Then _OnAutoItError(WinGetText("AutoIt Error"))
        Sleep(20)
    WEnd
    Exit
EndIf
 
#endregion;-------launcher

at the beginning of the script 

and the _OnAutoITError() function at the end of the script...
Customise the _OnAutoITError() function to add your functionality as jennico has designed it...

--<Edit> Minor Modifications in code - Event Monitoring now all in one switch statement. (I Felt comfortable with all event handlers in one place :-) )

--<edit> Just a minor modification to use few more pixel space which is wasted in above screenshot :-) use v 2.1's code pls.

Comments awaited

_ErrorHandler_V_2..au3

_ErrorHandler_V_2.1.au3

_ErrorHandler_V_2.1.1.au3

Edited by rajeshontheweb

Share this post


Link to post
Share on other sites



Moved to example scripts forum.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0