Queener Posted March 17, 2016 Share Posted March 17, 2016 (edited) I know this might be the simplest thing, but I can't think of a way to do this. My current project that I created to add assettag to excel; I want to activate a func only if the typing cursor is in $textbox1 and if {ENTER} key is pressed. And another thing is I want to be able to send a short-cut keys to my GUI interface as well. Eventhough if it's inactive or on the background, I could do ctrl+1 and it'll send that keys to it regardless. I tried: If _IsPressed("0D", $hDLL) And ControlClick("","",$inputmidasset) Then Opener() EndIf any help is much appreciated. Edited March 17, 2016 by Queener Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
Jfish Posted March 17, 2016 Share Posted March 17, 2016 I would think you could get the state of the control to see if it has focus. Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt Link to comment Share on other sites More sharing options...
taylansan Posted March 18, 2016 Share Posted March 18, 2016 Maybe you can use HotKeySet ? HotKeySet("{F6}", "_key") While 1 ;bla bla WEnd Func _key() MsgBox(0, "", "OK") EndFunc TY. Link to comment Share on other sites More sharing options...
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