Eigensheep Posted June 22, 2008 Posted June 22, 2008 Seems like a simple question but I can't find any other topics on it. Basically I'd like to call, for example, Func1 when the user hits the enter button inside a GUICtrlCreateInput, but I can't find how to do this. Using GUICtrlSetOnEvent() doesn't seem to work, nor will it inside a loop-type GUI event. The help file says "if you do not specify this style [$ES_WANTRETURN], pressing the ENTER key has the same effect as pressing the dialog boxs default push button." I'm thinking maybe creating a button that a user can't see? Would this work?
newbiescripter Posted June 22, 2008 Posted June 22, 2008 you could use _isPressed or hotkeyset to do something when the specific key is pressed
Eigensheep Posted June 22, 2008 Author Posted June 22, 2008 (edited) Thanks for the idea - I had thought of that, but I have multiple input boxes on the GUI and I only want the function to run when Enter is pressed in one of them. I suppose I could use GUICtrlGetState... [edit: Tried using If GUICtrlGetState($control) = $GUI_FOCUS Then... but it doesn't work. Any other ideas? Again, thanks for the reply.] Edited June 22, 2008 by logicBird
ResNullius Posted June 22, 2008 Posted June 22, 2008 Seems like a simple question but I can't find any other topics on it. Basically I'd like to call, for example, Func1 when the user hits the enter button inside a GUICtrlCreateInput, but I can't find how to do this. Using GUICtrlSetOnEvent() doesn't seem to work, nor will it inside a loop-type GUI event. The help file says "if you do not specify this style [$ES_WANTRETURN], pressing the ENTER key has the same effect as pressing the dialog boxs default push button." I'm thinking maybe creating a button that a user can't see? Would this work?http://www.autoitscript.com/forum/index.ph...st&p=535977
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