Jump to content

Recommended Posts

Posted (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 Error

Line 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 by grashopper
  • Moderators
Posted

grasshopper,

  Quote

Since my program has only a few hundred lines the error must be in one of the libraries

A 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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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:

  Reveal hidden contents

 

  • 1 month later...
Posted (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 by grashopper
  • Moderators
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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:

  Reveal hidden contents

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...