TheDcoder

Possible AU3Check Bug?

4 posts in this topic

#1 ·  Posted (edited)

Hello, I think I have encountered a bug in AU3Check... Here is the code with the bug:

#include <GuiButton.au3>

Local $idCancel

I get a "error: $idCancel previously declared as a 'Const'." when I run the code on line no. 3, here is the SciTE Console Log:

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3" /UserParams    
+>20:33:13 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0   Keyboard:00004009  OS:WIN_81/  CPU:X64 OS:X64    Environment(Language:0809)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\TheDcoder\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\TheDcoder\AppData\Local\AutoIt v3\SciTE
>Running AU3Check (3.3.14.1)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3
"C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3"(3,7) : error: $idCancel previously declared as a 'Const'.
Local $idCancel
~~~~~~^
C:\Users\TheDcoder\Desktop\AIO AutoIt Test Script.au3 - 1 error(s), 0 warning(s)
!>20:33:13 AU3Check ended. Press F4 to jump to next error.rc:2
+>20:33:13 AutoIt3Wrapper Finished.
>Exit code: 2    Time: 1.048

So, Is this a bug? Thanks in Advance, TD :D

Edited by TheDcoder
Simplified code

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites



TheDcoder,

No bug. If you actually bothered to work through the chain of include files that you get with GUIButton.au3 you find that you will also include MsgBoxConstants.au3, one line of which reads:

Global Const $IDCANCEL = 2 ; Cancel button was selected

So the name you have chosen was indeed already declared as a constant and hence you get the warning. I suggest you change the variable name you wish to use.

M23

P.S. I remember bringing up this very possibility when the constants were named - but was overruled - so there is no point in opening a feature request asking for them to be changed.


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

Nice explanation :o, I tried to search for $idCancel but I guess the search is case-sensitive, It explains all the contradictions :)

I was right about making a topic before opening a bug report :P

 

TD :D


Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

...After a second thought, where is MsgBoxConstants.au3 included!? Then I discovered its in GuiButton.au3 -> WinAPI.au3 :P

Just a FYI, TD :)


Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

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