Sign in to follow this  
Followers 0
Vindicator209

Can't use variables from GUIConst

5 posts in this topic

#1 ·  Posted (edited)

I tried running some of my old scripts when SciTE told me all those variables were used before declaration, like $WS_CLIPSIBLINGS or $SS_NOTIFY

I did recently reinstall autoit, but I checked the includes folder and it's all there... any reason why it's doing this?

Actually, I don't even know if it's GUIConstants thats missing, the form was generated by Koda, I just threw a wild guess there

Edited by VindicatorOmega

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites



Do you have #include <WindowsConstants.au3> at the top of your script else you have the old version


Contact via MSN: [email=terarink_msn@hotmail.com]terarink_msn@hotmail.com[/email], yahoo: terarink_yah

Share this post


Link to post
Share on other sites

#include <WindowsConstants.au3>

; For group

#include <StaticConstants.au3>

; For SS_notify

Put those include statements at the top of your script and you should be fine.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Sorry, I haven't revisited AutoIt for a while... is there a new version? I downloaded v3 from the autoit homepage, do I need beta or something?

& thanks

heres the full list from SciTE I'm getting:

G:\Archive\AutoIt Stuff\#LanSync\LanSync.au3(23,61) : WARNING: $WS_GROUP: possibly used before declaration.
$Pic1 = GUICtrlCreatePic("", 5, 5, 128, 128, BitOR($WS_GROUP,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
G:\Archive\AutoIt Stuff\#LanSync\LanSync.au3(23,78) : WARNING: $WS_CLIPSIBLINGS: possibly used before declaration.
$Pic1 = GUICtrlCreatePic("", 5, 5, 128, 128, BitOR($WS_GROUP,$WS_CLIPSIBLINGS)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
G:\Archive\AutoIt Stuff\#LanSync\LanSync.au3(35,78) : WARNING: $ES_PASSWORD: possibly used before declaration.
$Input3 = GUICtrlCreateInput("Password", 145, 70, 276, 21, BitOR($ES_PASSWORD,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
G:\Archive\AutoIt Stuff\#LanSync\LanSync.au3(35,94) : WARNING: $ES_AUTOHSCROLL: possibly used before declaration.
$Input3 = GUICtrlCreateInput("Password", 145, 70, 276, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
G:\Archive\AutoIt Stuff\#LanSync\LanSync.au3(151,88) : WARNING: $SS_NOTIFY: possibly used before declaration.
$Pic1 = GUICtrlCreatePic($Status&"Configurations.bmp", 5, 5, 128, 128, BitOR($SS_NOTIFY,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
G:\Archive\AutoIt Stuff\#LanSync\LanSync.au3(177,65) : WARNING: $ES_READONLY: possibly used before declaration.
$Interface = GUICtrlCreateEdit("", 135, 5, 491, 386,$ES_READONLY)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
G:\Archive\AutoIt Stuff\#LanSync\LanSync.au3(23,61) : ERROR: $WS_GROUP: undeclared global variable.
$Pic1 = GUICtrlCreatePic("", 5, 5, 128, 128, BitOR($WS_GROUP,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
G:\Archive\AutoIt Stuff\#LanSync\LanSync.au3 - 1 error(s), 6 warning(s)
!>00:06:35 AU3Check ended.rc:2

EDIT: okay, I added

#include <WindowsConstants.au3>

#include <EditConstants.au3>

#include <StaticConstants.au3>

to my heading, after looking each one of those up in the help file, anyway, when were these includes separated?

Edited by VindicatorOmega

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I don't understand what the question is, why don't you simply add the includes??

Edit: They were separated with v3.2.12.0 although you could/should have done it with v3.2.10.0 (or was it 3.2.11.x ??)

Edited by AdmiralAlkex

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  
Followers 0