Jump to content

Looking for a list of GUIGetMsg codes


Docfxit
 Share

Recommended Posts

Hi,

I'd like to find out if there is a list of GUIGetMsg codes someplace.

I'm getting

-3 = someone clicked on the X in the upper right corner.

-11 = I'd like to know what this is.

-7 = I'd like to know what this is.

6 = someone clicked on a GUI button.

Thank you,

Docfxit

Link to comment
Share on other sites

From Autoit3/Include/GuiConstantsEx.au3:

CODE
; Events and messages
Global Const $GUI_EVENT_CLOSE           = -3
Global Const $GUI_EVENT_MINIMIZE        = -4
Global Const $GUI_EVENT_RESTORE         = -5
Global Const $GUI_EVENT_MAXIMIZE        = -6
Global Const $GUI_EVENT_PRIMARYDOWN     = -7
Global Const $GUI_EVENT_PRIMARYUP       = -8
Global Const $GUI_EVENT_SECONDARYDOWN   = -9
Global Const $GUI_EVENT_SECONDARYUP     = -10
Global Const $GUI_EVENT_MOUSEMOVE       = -11
Global Const $GUI_EVENT_RESIZED         = -12
Global Const $GUI_EVENT_DROPPED         = -13

-CMR

Link to comment
Share on other sites

$submit = GUICtrlCreateButton("Submit", 10, 10, 100, 25)
$cancel = GUICtrlCreateButton("Cancel", 120, 10, 100, 25)

$msg = GUIGetMsg()

If $msg = $submit Then MsgBox(64, "", "You clicked SUBMIT !")
If $msg = $cancel Then MsgBox(64, "", "You clicked CANCEL !")

Looking in the helpfile, it says that GUICtrlCreateButton returns a controlID. Every control has

it's own controlID, so if I press the Submit-button then GUIGetMsg will that button's ID. Check

for the ID using the variables and that's it...

Link to comment
Share on other sites

$submit = GUICtrlCreateButton("Submit", 10, 10, 100, 25)
$cancel = GUICtrlCreateButton("Cancel", 120, 10, 100, 25)

$msg = GUIGetMsg()

If $msg = $submit Then MsgBox(64, "", "You clicked SUBMIT !")
If $msg = $cancel Then MsgBox(64, "", "You clicked CANCEL !")

Looking in the helpfile, it says that GUICtrlCreateButton returns a controlID. Every control has

it's own controlID, so if I press the Submit-button then GUIGetMsg will that button's ID. Check

for the ID using the variables and that's it...

Thanks for the info. I guess I should spelled out a little more in my first post. I do understand the contrlID's. It's the AutoIt (hidden) ID's that I didn't know. I was getting these in my debug

and didn't know why my button ID's were getting wiped out before they were checked by the Case in my loop.

Thank you,

Docfxit

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