Leo1906 Posted July 14, 2016 Share Posted July 14, 2016 (edited) Hey there, I didn't really know how to name the titel .. so let me explain it a bit further. You all might know that a compiled Autoit-Exe gives an error message containing the Error and the line when it crashes. Often those messages aren't usefull because it states the line in the compiled script is not the line in your script if you have used includes. Decompiling the exe often doesn't help either. Well .. I don't want to start a discussion about the benefits of those messages. I just want to disable them. I want my exe to just fail an crash and that's it. Nothing more. When there's an error there's an error. Autoit is the only language I have ever noticed those message boxes. I think now you can understand me .. Do you know any way to do this? Some compiler options or so? Or is it that deep implemented in Autoit that it can't be removed? Thanks for your help! Leo1906 Edited July 15, 2016 by Leo1906 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 14, 2016 Moderators Share Posted July 14, 2016 Leo1906, Quote Decompiling the exe You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing decompilation (and even mentioning it is not a good idea) - before you post again. Quote the line in the compiled script is not the line in your script if you have used includes It can be if you use Au3Stripper with the /MergeOnly option before compiling. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Leo1906 Posted July 14, 2016 Author Share Posted July 14, 2016 1 minute ago, Melba23 said: Leo1906, You appear not to have read the Forum rules since your arrival. Please do read them - particularly the bit about not discussing decompilation (and even mentioning it is not a good idea) - before you post again. It can be if you use Au3Stripper with the /MergeOnly option before compiling. M23 Ok you're right. So let's not talk about decompiling aggain. And thanks for the info on the /MergeOnly .. but this doesn't answer the question. It's not about how usefull it might be. In my opinion those messages are just ugly and I don't want them to appear. An example I noticed today: I was trying to read a really huge csv to an array and the program failed, saying that it was to much data for an array. Nice to know (for me the developer) but completly useless for somebody who doesn't know about those things. It could even be frightening. Link to comment Share on other sites More sharing options...
Bowmore Posted July 14, 2016 Share Posted July 14, 2016 It's the responsibility of the developer to check, for example, if too much data is being read into an array and take the appropriate action to prevent an error occurring in the first place. A well written application will not produce the error messages you want to get rid of. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook Link to comment Share on other sites More sharing options...
Leo1906 Posted July 14, 2016 Author Share Posted July 14, 2016 Just now, Bowmore said: It's the responsibility of the developer to check, for example, if too much data is being read into an array and take the appropriate action to prevent an error occurring in the first place. A well written application will not produce the error messages you want to get rid of. Why does everybody seems to only glance on the Offtopic parts of this thread? I think there can always be unexpected errors. In my example the maximum length of an array was exceeded. Didn't thought this would happen. (it would have been an array with over 1.000.000 entries, Despite that I don't think that there are many programs out there wich would definitly never crash, because the developer/s checked every detail meticulously. Please focus on the question and if you have nothing to contribute to the topic than just let it be .. Thanks Link to comment Share on other sites More sharing options...
spudw2k Posted July 14, 2016 Share Posted July 14, 2016 29 minutes ago, Leo1906 said: Please focus on the question and if you have nothing to contribute to the topic than just let it be .. Thanks Ahem, this is a public forum. Members are responding as they see fit. I'm sorry you don't like it, but that's not their problem. Sure, there can always be unexpected errors, but a robust program is as efficient and error free as possible. There is no reason why a script can't be designed to address known conditions/limits that could cause the script to fail. Search the forum for Error Handling to get some ideas. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
AutoBert Posted July 14, 2016 Share Posted July 14, 2016 (edited) 1 hour ago, Leo1906 said: Ok you're right. So let's not talk about decompiling aggain. In this forum you mustn't talk about decompiling. Read about Software License in helpfile specialy: Quote Reverse engineering. You may not reverse engineer or disassemble the SOFTWARE PRODUCT. I think @Jos isn't amused about your intend Edited July 14, 2016 by AutoBert Link to comment Share on other sites More sharing options...
Leo1906 Posted July 14, 2016 Author Share Posted July 14, 2016 4 minutes ago, AutoBert said: In this forum you mustn't talk about decompiling. Read about Software License in helpfile specialy: Haha ok I can do this too .. The License says: Quote The definition of SOFTWARE PRODUCT does not includes any files generated by the SOFTWARE PRODUCT, such as compiled script files in the form of standalone executables. Quote Reverse engineering. You may not reverse engineer or disassemble the SOFTWARE PRODUCT. You see: I am totally allowed to decompile my OWN scripts. I am just not allowed to decompile Autoit and the parts of it like the compiler or so! And now let's talk about the forum: Quote Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects: [...] Decompilation of AutoIt scripts or details of decompiler software. My intention was not to start a topic about decompilation. That was all you guys could focus on .. I also didn't post a link or asked for help with decompilation! It was just a side note. I didn't expect you guys to take it so seriously ..?! And now what? Am I the only one that thinks that this thread is now completly Offtopic? In other forums I am used to the method of "Offtopic is forbidden" ... I was just asking if there's a way to disable the error functions. I now see that it is either not possible (a simple no would have been enough) or that yu guys just don't know about it .. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 14, 2016 Moderators Share Posted July 14, 2016 @AutoBert asked and answered by a Mod - there is no reason for you to do nothing more than parrot what has already been said. @Leo1906 I would highly suggest you check your attitude toward forum members who are trying to assist. I agree with others, who can't seem to wrap their minds around why you want to take the lazy route and "hide" error messages rather than coding correctly. It seems you are looking to this community to tell you it is okay to adopt bad coding processes, and I don't see that as something you're going to hear (and shame on the person who does tell you that). It boils down to this: Can you handle error and do proper error checking? Yep, spudw2k has already given you suggestions Is anyone going to waste their time and effort helping you completely hide all errors, effectively making anything you code Crapware? Don't hold your breath "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Leo1906 Posted July 14, 2016 Author Share Posted July 14, 2016 1 minute ago, JLogan3o13 said: @Leo1906 I would highly suggest you check your attitude toward forum members who are trying to assist. I agree with others, who can't seem to wrap their minds around why you want to take the lazy route and "hide" error messages rather than coding correctly. It seems you are looking to this community to tell you it is okay to adopt bad coding processes, and I don't see that as something you're going to hear (and shame on the person who does tell you that). I'm sorry. I didn't want to get rude to anybody. I wasn't expecting this when I started the thread .. And as I stated Quote Well .. I don't want to start a discussion about the benefits of those messages. And I don't get it when people do exactly what I was NOT trying to achieve. I like to apologize to the people I offended and thank those who actually wanted to help me Link to comment Share on other sites More sharing options...
JohnOne Posted July 15, 2016 Share Posted July 15, 2016 Leo1906 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
water Posted July 15, 2016 Share Posted July 15, 2016 Some ideas why I would NOT suppress run-time error messages: When a script crashes when used in prodcution those run time error messages are helpful. Imagine you suppress all error messages debugging gets much more complex. Recreating the error means to know exactly what the user did (buttons pressed, data entered etc.). Most of the time the answer you get is: "I did nothing wrong. Suddently the program crashed." So error messages at least provide a starting point for debugging. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Leo1906 Posted July 15, 2016 Author Share Posted July 15, 2016 3 hours ago, JohnOne said: Thats perfect and exactly what I was looking for Thanks for that! Now I have the option for disabling the messages completly or even show nicer error messages Link to comment Share on other sites More sharing options...
Skysnake Posted July 19, 2016 Share Posted July 19, 2016 Please see this? @trancexx provided an excellent solution: https://www.autoitscript.com/forum/topic/154081-avoid-autoit-error-message-box-in-unknown-errors/?page=1 Leo1906 1 Skysnake Why is the snake in the sky? 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