Niceygy Posted June 5, 2024 Posted June 5, 2024 My app has a weird error that we have been trying to track for a while now. The trouble is when the compiled exe crashes, it gives a generic error message (below). Is there a way to have a more helpful message? ########################################################################### I'm Niceygy, but you can call me nicey (nice-ee). AutoIT, JS & C# Dev. I'm no expert! ############################################################################
Developers Jos Posted June 5, 2024 Developers Posted June 5, 2024 The error is not generic, and you are informed about the exact error and the line number. So merge the script with au3stripper to understand what that line number really is, or post the code when you want more help! SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Niceygy Posted June 6, 2024 Author Posted June 6, 2024 What do you mean "merge the script"? Also the line number is useless because the code is compiled, and the issue (annoyingly enough) doesn't seems to occur when not compiled. ########################################################################### I'm Niceygy, but you can call me nicey (nice-ee). AutoIT, JS & C# Dev. I'm no expert! ############################################################################
Moderators Melba23 Posted June 6, 2024 Moderators Posted June 6, 2024 Niceygy, Quote What do you mean "merge the script"? Use Au3Stripper with the /MergeOnly flag to get the full script file as passed to Aut2Exe - then the line numbers will match. See SciTE help for more full details. You will need the full SciTE4AutoIt3 package to do this. But better still - debug the script and prevent the error by adding some form of errorchecking code. 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
rsn Posted June 6, 2024 Posted June 6, 2024 (edited) This happened to me recently. First be sure you're using the full SciTE editor. Then add the following to the directives at the top: #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/mo When you next compile it, a version of your script with "_stripped" appended to the filename will be created. When you open that one up, the line number in the error will make sense. If you have a lot of commented lines in your code, the number might be off a little but it'll be in the vicinity. Edited June 7, 2024 by rsn Niceygy 1
Niceygy Posted June 6, 2024 Author Posted June 6, 2024 6 hours ago, Melba23 said: Niceygy, Use Au3Stripper with the /MergeOnly flag to get the full script file as passed to Aut2Exe - then the line numbers will match. See SciTE help for more full details. You will need the full SciTE4AutoIt3 package to do this. But better still - debug the script and prevent the error by adding some form of errorchecking code. M23 Ah, I see! Thanks And the error checking I have at the moment is: While @error == 0 Or $finished == False Because apparently autoit doesn't have try-catch. Any better ideas welcome lol ########################################################################### I'm Niceygy, but you can call me nicey (nice-ee). AutoIT, JS & C# Dev. I'm no expert! ############################################################################
Niceygy Posted June 6, 2024 Author Posted June 6, 2024 So apparently my stripped file only goes to 10k lines, and the error is on line 19k. What have I done wrong? 😅 ########################################################################### I'm Niceygy, but you can call me nicey (nice-ee). AutoIT, JS & C# Dev. I'm no expert! ############################################################################
ioa747 Posted June 6, 2024 Posted June 6, 2024 (edited) Briefly: you must have it installed: SciTE4AutoIt3 you put at the top of the script #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/mo then go to the Compiled process Ctrl F7 this has the effect of creating an additional single script with all #includes embedded , named_stripped.au3 https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/Au3Stripper.html Edited June 7, 2024 by ioa747 I know that I know nothing
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