Jump to content

Possible AU3Check Bug?


TheDcoder
 Share

Recommended Posts

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

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • Moderators

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.

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:

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

 

Link to comment
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

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
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 :)

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...