Jump to content

problems with the way autoit that i shouldnt have?


Recommended Posts

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

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

Link to comment
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]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...