lionfaggot Posted February 3, 2011 Share Posted February 3, 2011 func _msgcls() if WinExists("poop", "") = 1 Then $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then GUISetState(@SW_HIDE) EndIf endif endfunc when i compile it tells me $GUI_EVENT_CLOSE isnt declared, but i dunno why i should have to declare this when its you know, $GUI_EVENT_CLOSE isnt a variable is this a bug i found or am i doing something wrong? Link to comment Share on other sites More sharing options...
jvanegmond Posted February 3, 2011 Share Posted February 3, 2011 $GUI_EVENT_CLOSE is a variable. This variable is defined in another file. This file is called an include. You can use includes with the #include directive. The file you need to include is called GUIConstantsEx.au3. Your code should contain this:#include <GUIConstantsEx.au3>And just in case you don't know, it should be at the top. Just like all the GUI examples. github.com/jvanegmond Link to comment Share on other sites More sharing options...
hannes08 Posted February 3, 2011 Share Posted February 3, 2011 func _msgcls() if WinExists("poop", "") = 1 Then $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then GUISetState(@SW_HIDE) EndIf endif endfunc when i compile it tells me $GUI_EVENT_CLOSE isnt declared, but i dunno why i should have to declare this when its you know, $GUI_EVENT_CLOSE isnt a variable is this a bug i found or am i doing something wrong? Hi lionfaggot, #include-once ; #INDEX# ======================================================================================================================= ; Title .........: GUIConstantsEx ; AutoIt Version : 3.2 ; Language ......: English ; Description ...: Constants to be used in GUI applications. ; Author(s) .....: Jpm, Valik ; Dll ...........: ; =============================================================================================================================== ; #CONSTANTS# =================================================================================================================== ; Events and messages Global Const $GUI_EVENT_CLOSE = -3 $GUI_EVENT_CLOSE is a Constant. just include GUIConstantsEx.au3 and WindowsConstants.au3 as described in the help file... Regards, Hannes Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
lionfaggot Posted February 3, 2011 Author Share Posted February 3, 2011 thanks, should've known. i just didnt notice the extra include Link to comment Share on other sites More sharing options...
lionfaggot Posted February 3, 2011 Author Share Posted February 3, 2011 now its not hiding the window, man, now im really lost, click close and its like nothing. i have include files etc :\ Link to comment Share on other sites More sharing options...
jvanegmond Posted February 3, 2011 Share Posted February 3, 2011 now its not hiding the window, man, now im really lost, click close and its like nothing. i have include files etc:\There's nothing wrong with your posted code. Mostly because we don't know how you are calling the function. Post more relevant code and we can identify the problem. github.com/jvanegmond Link to comment Share on other sites More sharing options...
lionfaggot Posted February 3, 2011 Author Share Posted February 3, 2011 its in an infinite while loop, and the guibox is just invoked with guicreate() then guisetstate() lol, nothing too special Link to comment Share on other sites More sharing options...
kylomas Posted February 3, 2011 Share Posted February 3, 2011 Yes, we are quite sure of that. Post the code, anyway and you will get a response. Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
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