Gal Posted August 17, 2010 Posted August 17, 2010 (edited) I've noticed that Send can trigger an HotKeySet, for example if I have HotKeySet("w", "write") Func write() ; this method some times writes w and some times performs something different ; according to some flag or w/e If (flag) ; do something else Send("w") endfunc What I want to do, is have some different Send method, which never triggers the hotkeyset, this can be done with ControlSend _IF_ I know the control I want to send it to... in my case, I don't. I simply want to send the key to the currently focused control exactly the way it would have if it was the Send method. What I was thinking is maybe ControlSend with some parameteres can have like a @currentlyFocused autoit keyword which automatically gives me the ID or name that is needed for ControlSend to send to the currently focused control, however I am not that familiar with the autoit keywords so if anyone could point out the correct format for this or a smarter way to implement what I need I would really appreciate it... Thanks Gal Edited August 17, 2010 by Gal
AdmiralAlkex Posted August 17, 2010 Posted August 17, 2010 (edited) Hi and Welcome to the forums! Just unset the HotKeySet() before you Send() and then set it back. HotKeySet("a", "_test") While 1 Sleep(1000) WEnd Func _test() HotKeySet("a") Send("abc") HotKeySet("a", "_test") EndFunc Edited August 17, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Gal Posted August 17, 2010 Author Posted August 17, 2010 Awesome, thanks I read that part in the help file but I guess I thought I could only unset the hotkey outside a function. Thanks again
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