Jump to content
Sign in to follow this  
Compjotter

ERROR: $WS_CLIPSIBLINGS previously declared as a 'Const'

Recommended Posts

Compjotter

Hello

I create a simple button with GuiBuilder but I get a Error Message. What I'm doing wrong?

Script:

#region --- GuiBuilder code Start ---

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("MyGUI", 392, 316,(@DesktopWidth-392)/2, (@DesktopHeight-316)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Button_1 = GuiCtrlCreateButton("Button1", 50, 70, 140, 80)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case Else

;;;

EndSelect

WEnd

Exit

#endregion --- GuiBuilder generated code End ---

ERROR message:

>C:\Program Files\AutoIt3\SciTe\CompileAU3\CompileAU3.exe /in "C:\Program Files\AutoIt3\Test\goei.au3"

>Running AU3Check...

C:\Program Files\AutoIt3\Test\goei.au3(6,79) : ERROR: $WS_CLIPSIBLINGS previously declared as a 'Const'

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Test\goei.au3 - 1 error(s), 0 warning(s)

>AU3Check Ended with Error(s).

>Exit code: 0 Time: 6.457

Share this post


Link to post
Share on other sites
MHz

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

Remove the above line. It is already declared a Const value in GuiContants and the error is warning you that the script is trying to possibly redeclare or assign it a value.

Share this post


Link to post
Share on other sites
Compjotter

Remove the above line. It is already declared a Const value in GuiContants and the error is warning you that the script is trying to possibly redeclare or assign it a value.

Thanks, it works............

.........but it is a command for NotDeclare so i don't understand your explanation.

Share this post


Link to post
Share on other sites
GaryFrost

Thanks, it works............

.........but it is a command for NotDeclare so i don't understand your explanation.

That's an AU3Check error not a compiliation error


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.