GoogleDude Posted November 13, 2010 Share Posted November 13, 2010 (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. Things to note :AutoIt Script v3.3.6.1 was used at the time I did this.Works with Compiled and UnCompiled ScriptsIt 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.exeSince 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! This is where sendemail.exe is downloaded from the internet_MyErrorHandler.au3test.au3 Edited November 14, 2010 by GoogleDude Link to comment Share on other sites More sharing options...
engjcowi Posted November 14, 2010 Share Posted November 14, 2010 (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 November 15, 2010 by engjcowi Drunken Frat-Boy Monkey Garbage Link to comment Share on other sites More sharing options...
GoogleDude Posted November 15, 2010 Author Share Posted November 15, 2010 Thanks for removing that. Next time I need to make sure to look closer for that type of stuff. Link to comment Share on other sites More sharing options...
James Posted November 16, 2010 Share Posted November 16, 2010 (edited) Hi GoogleDude,Looks pretty useful! I'll be using this in the next release of my application; iTunesTweet JamesEdit: Taking a closer look at the code it seems to call another EXE hosted on DropBox. No thanks. Edited November 16, 2010 by JamesBrooks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
water Posted November 16, 2010 Share Posted November 16, 2010 (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 November 16, 2010 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
GoogleDude Posted November 17, 2010 Author Share Posted November 17, 2010 (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 November 17, 2010 by GoogleDude Link to comment Share on other sites More sharing options...
GoogleDude Posted November 17, 2010 Author Share Posted November 17, 2010 Hi GoogleDude,Looks pretty useful! I'll be using this in the next release of my application; iTunesTweet JamesEdit: 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now