I have a weird problem..
I have the following code to show the problem. If you run this, you get an edit field with a button. If you press the button, you get a MsgBox with the text that is in the edit box. All is good up until this point.
If you press ^t; you should get the same result. However, it seems like the program just skips over the Gui, Submit when using the hotkey. When you press ^t BEFORE you have ever hit the button, it shows an empty MsgBox. When you press the Button and after that you press ^t, it shows the text that is inside the edit. When you change the text in the editbox however, ^t will still just show the old text instead of the new text. That is until you press the button again.
Am I wrong in thinking ^t and the button should do exactly the same? And, more importantly, how do I get my code to Gui, Submit using the hotkey instead of the button?
Thanks so much for your help!
Joab
Code: Select all
Gui, New, , TEST
Gui, Add, Edit, vtestfield, tekstdsfssfgdhghgdgdghdhgdhdfgh
Gui, Add, button, gaction, testbutton
Gui, show, AutoSize
^t::
action:
gui, submit, Nohide
MsgBox % testfield
return
GuiClose:
ExitApp