Docfxit Posted December 27, 2006 Posted December 27, 2006 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
CodeMaster Rapture Posted December 27, 2006 Posted December 27, 2006 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
Docfxit Posted December 27, 2006 Author Posted December 27, 2006 Thank you very much CMR. Now I'm not wondering any more. Docfxit
Helge Posted December 27, 2006 Posted December 27, 2006 $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...
Docfxit Posted December 27, 2006 Author Posted December 27, 2006 $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
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