TheDcoder Posted November 3, 2015 Share Posted November 3, 2015 (edited) Hello, I think I have encountered a bug in AU3Check... Here is the code with the bug:#include <GuiButton.au3> Local $idCancelI 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.048So, Is this a bug? Thanks in Advance, TD Edited November 3, 2015 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 More sharing options...
Moderators Melba23 Posted November 3, 2015 Moderators Share Posted November 3, 2015 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 selectedSo 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.M23P.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 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...
TheDcoder Posted November 3, 2015 Author Share Posted November 3, 2015 Nice explanation , 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 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 More sharing options...
TheDcoder Posted November 3, 2015 Author Share Posted November 3, 2015 ...After a second thought, where is MsgBoxConstants.au3 included!? Then I discovered its in GuiButton.au3 -> WinAPI.au3 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 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