Sign in to follow this  
Followers 0
GoogleDude

My Sloppy but working Basic Error Handler

7 posts in this topic

#1 ·  Posted (edited)

Hello,

I have made a very sloppy but working (at least for me) Error Handler for Compiled or UnCompiled AU3 scripts. Since I lack good clean AU3 scripting skills like most other on this board I will admit it is very sloppy and most of the real work came from jennico and MrCreatoR. Since I was having trouble getting theres to work with the latest version of autoit I tweak the holy hell out of it until it worked in a very very basic manner.

I know a lot can be cleaned up and improved but I will leave that to whom ever cares to play with it.

Again this is very basic but it was a big learning process for me. :graduated:

Things to note :

AutoIt Script v3.3.6.1 was used at the time I did this.

Works with Compiled and UnCompiled Scripts

It does not have a fancy GUI with pretty buttons - very basic. 2 buttons (Send Bug Report & Close Program)

All it does it catch a script error and show a basic description of the error to the user and allow him/her to send a bug report to the developer.

It can collect an email address from user at the time the bug report is sent to the developer so the user can be notified of new versions of the script that fix said error.

To keep down on size the binary used to send the email (sendemail.exe) which is 1.6MB in size is downloaded from the internet at time of bug report being sent.

For info on SendEmail.exe

Since I myself dont care to get emails of uncompiled scripts it only tells the user the script error description such as "Error parsing function call" for example.

I am not sure how to get the full au3 script error along with line number ect.. from a compiled script. When I was testing it with compiled scripts it was giving me the line number in the EXE itself which was like line number 756 for example. If someone can fix that it would be great. I would like to be able to hide completely the autoit error that pops up really fast before my GUI catches it. Anyone know how to do that?

It took 30mins to type this all up it only takes 3 seconds for someone to say "What the hell is he thinking" lol.

I am ready for a lot of criticism! :(

Posted Image

Posted Image

This is where sendemail.exe is downloaded from the internet

Posted Image

Posted Image

_MyErrorHandler.au3

test.au3

Edited by GoogleDude

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi ive tried and it works fine. i get an email and im v happy thanks. I was wondering what this line is used for?

RunWait(@TempDir & '\sendemail.exe -f thelistedemailaddress@gmail.com -xu thelistedemailaddress@gmail.com -xp thepassword -s smtp.gmail.com:587 -m '&StringFormat($sErrorMsgFormat, $sScriptPath, $sErrDesc)&' -u Error with AutoIt Script '&@ScriptName&' -t thelistedemailaddress@gmail.com',"",@SW_HIDE)

i only ask as i declare my email above so if i didnt look through code i would have seen it. Your email details are here. you might want to remove them from your script. But what is it for if the email is sent prior to this?

thanks

(edited)

by request of topic owner to remove personal email address

Edited by engjcowi

Drunken Frat-Boy Monkey Garbage

Share this post


Link to post
Share on other sites

Thanks for removing that. Next time I need to make sure to look closer for that type of stuff.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hi GoogleDude,

Looks pretty useful! I'll be using this in the next release of my application; iTunesTweet :graduated:

James

Edit: Taking a closer look at the code it seems to call another EXE hosted on DropBox. No thanks.

Edited by JamesBrooks

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Instead of loading a 1.6m exe from the internet to send an email couldn't you do it with pure AutoIT? You could use this

Or use something small like blat (155kb)?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Instead of loading a 1.6m exe from the internet to send an email couldn't you do it with pure AutoIT? You could use this

Or use something small like blat (155kb)?

The reason I used sendemail.exe is because it allowed me to use a TXT file as the message body of the email being sent. I thought it could be usefull when collecting system info.

Thanks for the info on blat. I will check it out.

~GD

Edited by GoogleDude

Share this post


Link to post
Share on other sites

Hi GoogleDude,

Looks pretty useful! I'll be using this in the next release of my application; iTunesTweet :graduated:

James

Edit: Taking a closer look at the code it seems to call another EXE hosted on DropBox. No thanks.

Yes I agree. I didnt think about how some people might look at that. You can simply replace that URL with the URL that is hosting sendemail.exe as long as it is a direrct download link. I was trying to keep the initial size of the compiled script down.

~GD

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