Sign in to follow this  
Followers 0
gamers600

Variable Not Declared

5 posts in this topic

When I try running the script here http://www.autoitscript.com/forum/index.ph...mp;hl=brain.txt I get the following error:

(39) : ==> Variable used without being declared.:

$history = GUICtrlCreateEdit("Please type in the input field at the bottom."&@CRLF&"---------------", 10, 10, 240, 230, BitOR($WS_VSCROLL, $ES_READONLY, $ES_AUTOVSCROLL))

$history = GUICtrlCreateEdit("Please type in the input field at the bottom."&@CRLF&"---------------", 10, 10, 240, 230, BitOR(^ ERROR

Does anyone know how to fix this?

Share this post


Link to post
Share on other sites



add #include <WindowsConstants.au3> to the script

Share this post


Link to post
Share on other sites

add #include <WindowsConstants.au3> to the script

That error is gone but a new one is caused:

(41) : ==> Variable used without being declared.:

$Sbutton = GUICtrlCreateButton("Say", 200, 260, 50, 30, $BS_DEFPUSHBUTTON)

$Sbutton = GUICtrlCreateButton("Say", 200, 260, 50, 30, ^ ERROR

Share this post


Link to post
Share on other sites

When I try running the script here http://www.autoitscript.com/forum/index.ph...mp;hl=brain.txt I get the following error:

(39) : ==> Variable used without being declared.:

$history = GUICtrlCreateEdit("Please type in the input field at the bottom."&@CRLF&"---------------", 10, 10, 240, 230, BitOR($WS_VSCROLL, $ES_READONLY, $ES_AUTOVSCROLL))

$history = GUICtrlCreateEdit("Please type in the input field at the bottom."&@CRLF&"---------------", 10, 10, 240, 230, BitOR(^ ERROR

Does anyone know how to fix this?

Need to add

#include <Array.au3>

#include <WindowsConstants.au3>

#include <ButtonConstants.au3>

#include <ScrollBarConstants.au3>

and change

Global $contents = _XMLLoad("brain.aiml")

to

Global $contents = _XMLLoad("brain.txt")

Share this post


Link to post
Share on other sites

Need to add

#include <Array.au3>

#include <WindowsConstants.au3>

#include <ButtonConstants.au3>

#include <ScrollBarConstants.au3>

and change

Global $contents = _XMLLoad("brain.aiml")

to

Global $contents = _XMLLoad("brain.txt")

thanks it works now

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