Sign in to follow this  
Followers 0
lionfaggot

problems with the way autoit that i shouldnt have?

8 posts in this topic

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?

Share this post


Link to post
Share on other sites



$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.

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

thanks, should've known. i just didnt notice the extra include :)

Share this post


Link to post
Share on other sites

now its not hiding the window, man, now im really lost, click close and its like nothing. i have include files etc

:\

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

its in an infinite while loop, and the guibox is just invoked with guicreate() then guisetstate()

lol, nothing too special

Share this post


Link to post
Share on other sites

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

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