obrienj Posted August 22, 2011 Share Posted August 22, 2011 (edited) I have a 1412 line script with about 20 includes. On rare occasions Autoit pops an error message box telling me that an "array index is out of range" or some such and terminates the script just as it should. However, the error message references line 9216 which I guess is a line in my code after all of the includes are pre-pended. Is there a way to either (1) save the intermediate source (after includes are resolved), (2) dis-assemble the .exe to see all lines of code, or something else so I can see exactly where the error is. Regards, Jim Edited August 22, 2011 by obrienj Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 22, 2011 Moderators Share Posted August 22, 2011 obrienj,When compiling your script, run Obfuscator using the /STRIPONLY parameter. That way the compiler uses an au3 file which has the include files included, but all unused functions, variables, comments and blank lines removed. It is saved in the same folder as the source and named YourScriptName_Obfuscated.au3. You need to add these directives to the top of your script:#AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/soThen when the error occurs, it is easy to see which line gave the fault as it is this Obfuscated file which has been compiled - just scroll to the indicated location. The only problem we know of is that using the line continuation operator screws up the count, but apart from that it works fine. Of course, you need the full SciTE4AutoIt3 package, which you can download from here if you do not already use it. M23 exolon 1 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...
exolon Posted September 16, 2011 Share Posted September 16, 2011 When compiling your script, run Obfuscator using the /STRIPONLY parameter. That way the compiler uses an au3 file which has the include files included, but all unused functions, variables, comments and blank lines removed. It is saved in the same folder as the source and named YourScriptName_Obfuscated.au3. You need to add these directives to the top of your script:Great! I was just going to post about this, since I'm having exactly the same problem. It's a shame we can't get stacktraces and source-accurate line numbers (when using the compiler). Maybe there's a way to instrument the code with debugging markers to roll your own stack trace? 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