supadodger Posted October 14, 2010 Share Posted October 14, 2010 i have a bunch of code like this If Not IsArray ($blah) Then MsgBox(0,"","Array Error On Line 95") EndIf the problem is everytime i make changes to the script i have to go edit every one of them MsgBox With the new line number of the script. is there anything built in that i can use to automate this? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 14, 2010 Moderators Share Posted October 14, 2010 supadodger,Dog eaten your Help file? Try @ScriptLineNumber.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...
Developers Jos Posted October 14, 2010 Developers Share Posted October 14, 2010 Won't work to well in a compiled script 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. Link to comment Share on other sites More sharing options...
UEZ Posted October 14, 2010 Share Posted October 14, 2010 Remark: will not work when compiled. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 14, 2010 Moderators Share Posted October 14, 2010 Hey,He can read that bit for himself! Besides debugging should come before compilation - although looking at the number of "Error on Line -1" posts it is not a common trait. 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...
willichan Posted October 14, 2010 Share Posted October 14, 2010 I don't suppose a #CurrentLineNum compiler directive that gets replaced at compile/runtime is within the realm of possibility, maybe? My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 15, 2010 Moderators Share Posted October 15, 2010 willichan,The more recent AutoIt releases will tell you which line of the compiled script caused a fatal error, but you need to use the script produced by Obfuscator with the /StripOnly directive to be able to determine the actual line. This is because the "compiled" script also contains all the includes and hss the blank lines and comments stripped. It works well using these directives:#AutoIt3Wrapper_Run_Obfuscator=y#Obfuscator_Parameters=/soIf you just want to know where you are in the compiled script, then you could use the _DeBug* commands - you have to mention where you are rather than use the @ScriptLineNumber macro, but it is still pretty useful. 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...
supadodger Posted October 16, 2010 Author Share Posted October 16, 2010 (edited) I don't suppose a #CurrentLineNum compiler directive that gets replaced at compile/runtime is within the realm of possibility, maybe?This Is What i was hoping existed....i just made another script that i run on every script ahead of time to update the line numbers...Besides debugging should come before compilation - although looking at the number of "Error on Line -1" posts it is not a common trait. i know debugging should happen before compile but lets say im doing a _stringbetween on an ie attach which the page doesnt load i want the person i send the compiled script to be able to tell me where the error occured so i can try to figure out why its not loading.thanks anyway guys. i was just hoping for something like this to make my life simpler. Edited October 16, 2010 by supadodger 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