Jump to content
Sign in to follow this  

$WM_COMMAND & some function do not work in latest autoit compiler

Recommended Posts

Hello all,

i have an interesting problem. Till recently i was using very old autoit compiler ( and every script in it works fine without any errors. After i got my self a new PC and OS i tried with the latest compiler and it reproduces a number of errors which i can not solve by my own.

1st error is: Can not find GuiCombo.au3 - but this is managable.

2nd error is: with WM_COMMAND (error description is: Can not redeclare a constant!)

3rd error is: Function name does not exist: _GUICtrlListViewSetColumnWidth

4th error is: Function name does not exist: _GUICtrlComboSetCurSel

Anyway ... ihope you can give me a hand how to make this work.

Thanks for your input! :unsure:

autoit]#include <GUIConstants.au3>

#include <ComboConstants.au3>

#Include <GuiCombo.au3>

#Include <GuiListView.au3>

#include <WindowsConstants.au3>

#include <String.au3>

#include <Array.au3>

#include <File.au3>

#include <Winpcap.au3>

Global Const $WM_COMMAND = 0x0111 [/autoit]

Share this post

Link to post
Share on other sites


There were huge changes in how AutoIt dealt with include files in v3.2.12.0 - your old scripts are running foul of that. There were also many changes to the names of the include files and various functions within them - for example, GuiCombo.au3 became GuiComboBox.au3. mMny contants were added to the new includes - $WM_COMMAND is already in WindowsConstants.au3 and so no longer needs to be delared separately (which causes the error you point out).

I suggest you look at this thread explaining the differences. You are in for a complete rewrite of all your scripts I am afraid, replacing all the include filenames and function names and omitting double declared constants. But it will be worth the effort as the newer versions of AutoIt are much more powerful and have many added features. Just do not leave it aso long to upgrade next time! :>

Good luck! :unsure:


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:


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

It's not that difficult to change them considering you only have 4 Errors.

Replace #Include <GUIConstants.au3> with #Include <GUIConstantsEx.au3>

#Include <GuiComboBox.au3> replaces #Include <GuiCombo.au3>

_GUICtrlListView_SetColumnWidth() replaces _GUICtrlListViewSetColumnWidth() ;; Check for a change of parameters here

_GUICtrlComboBox_SetCurSel($hWnd[, $iIndex = -1]) replaces _GUICtrlComboSetCurSel() ;; Again check for a change of parameters

Remove the Global Const $WM_COMMAND = 0x0111 line. It's already declared in WindowsConstants.au3

You may also have to add the line #Include<StaticConstants.au3> but that depends on your script.

That should handle all the errors you are getting now but there may be more that show up later.

For many (not all) of the control changes in the link M23 provided you can write a simple script to do them for you. I had one but I disposed of it a long time ago.


Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver: - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...