grashopper Posted November 25, 2015 Posted November 25, 2015 (edited) I have written an AutoIt program that communicates with a RFXCOM transciever to control my home. This program runs 24/7 and occasionally I get the following message in a modal window:AutoIt ErrorLine 6102 (File "C:\homecontrol\HC.exe"):Error: Missing right bracket ')' in expression.OK button.My program waits for an operator input. So I have lost control and I am not able to terminate the program and start it again. Since my program has only a few hundred lines the error must be in one of the libraries. My questions are:What is causing this error?How can I trap this error?In which library is this error generated?This are my includes:#include 'C:\COMMGvv2\CommMG.au3'#include <GUIConstantsEx.au3>#include <Date.au3>#include <WindowsConstants.au3>#include <EditConstants.au3>#include <StaticConstants.au3>#include <file.au3>In the code I have already an error trap:$objErr = ObjEvent("AutoIt.Error","MyErrFunc") Edited November 25, 2015 by grashopper
Moderators Melba23 Posted November 25, 2015 Moderators Posted November 25, 2015 grasshopper,Since my program has only a few hundred lines the error must be in one of the librariesA pretty bold statement.I suggest you post the "few hundred lines" of code (and perhaps CommMG.au3 as the only non-standard include file you are using as well) so we can take a look. When you post please use Code tags - see here how to do it.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
grashopper Posted January 9, 2016 Author Posted January 9, 2016 (edited) I found the error. It was indeed a missing bracket. What puzzles me is that the error was located in line 200 of my program. But the error message said line 6102. Is there an explanation for that? Edited January 9, 2016 by grashopper
Developers Jos Posted January 9, 2016 Developers Posted January 9, 2016 The included files at the top of the script.Jos 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.
grashopper Posted January 12, 2016 Author Posted January 12, 2016 Knowing this, what would be the best approach to determine the original line number?
Moderators Melba23 Posted January 12, 2016 Moderators Posted January 12, 2016 grasshopper,Use Au3Stripper with this directive:/MergeOnly /MO Will produce a scriptfile as AUT2EXE includes in the Compiled EXE. This allows you to find the proper linenumber when errors are reported.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
grashopper Posted January 13, 2016 Author Posted January 13, 2016 Thank you for helping me. I´ll keep this in mind the next time I get an error.
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