Jump to content
Sign in to follow this  
gamers600

Variable Not Declared

Recommended Posts

gamers600

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
Rental

add #include <WindowsConstants.au3> to the script

Share this post


Link to post
Share on other sites
gamers600

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
Malkey

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
gamers600

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  

×

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.