Jump to content
Sign in to follow this  
Docfxit

Looking for a list of GUIGetMsg codes

Recommended Posts

Docfxit

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

Share this post


Link to post
Share on other sites
CodeMaster Rapture

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

Share this post


Link to post
Share on other sites
Docfxit

Thank you very much CMR.

Now I'm not wondering any more.

Docfxit

Share this post


Link to post
Share on other sites
Helge

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

Share this post


Link to post
Share on other sites
Docfxit

$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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.