DotJock Posted August 26, 2009 Posted August 26, 2009 Several versions back of AutoIT3, I was successfully using "$Case $msg = $GUI_EVENT_CLOSE" in a Select loop. With the current version I'm getting the error: "==> Variable used without being declared.:" Any suggestions on a fix? >_
Appie78 Posted August 26, 2009 Posted August 26, 2009 Hi DotJock, The "$Case" should be "Case". Try this! While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE EndSelect WEnd Appie Electron microscopes rule!!!
DotJock Posted August 26, 2009 Author Posted August 26, 2009 Hi Appie, Thank you for the reply. I'm getting the same error with script you just provided: ==> Variable used without being declared.: DotJock Hi DotJock, The "$Case" should be "Case". Try this! While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE EndSelect WEnd Appie
Appie78 Posted August 26, 2009 Posted August 26, 2009 Hi Appie, Thank you for the reply. I'm getting the same error with script you just provided: ==> Variable used without being declared.: DotJock Try this I tested it and it worked!! You probably forgot the "#include <GUIConstantsEx.au3>" #include <GUIConstantsEx.au3> GUICreate("Test", 100, 100) GUICtrlCreateLabel("Test Window", 10, 10) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Electron microscopes rule!!!
DotJock Posted August 26, 2009 Author Posted August 26, 2009 Thanks Appie, that did it. Guess I was having another “geriatric moment.” Interesting though, in an older version of AutoIT3, I didn’t need “#include <GUIConstantsEx.au3>” to make “Case $msg = $GUI_EVENT_CLOSE” work. Anyway, now I know I do. Thanks again.
AdmiralAlkex Posted August 26, 2009 Posted August 26, 2009 Thanks Appie, that did it. Guess I was having another “geriatric moment.” Interesting though, in an older version of AutoIT3, I didn’t need “#include <GUIConstantsEx.au3>” to make “Case $msg = $GUI_EVENT_CLOSE” work. Anyway, now I know I do.Thanks again.The default includes had a lot of changes in v3.2.12.0. Read more in helpfile by searching for "script breaking changes" and look at the second topic. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now