sias Posted February 7, 2016 Posted February 7, 2016 Good afternoon, I am having difficulties with HotKeySet when setting the hotkey as " { ". I do not see anywhere in the help file showing that this key is reserved by windows and every other key that I register appears to work. Simply put when I press the " { " key it will write " { " to whatever active program I have open as opposed to capturing the key and sending the appropriate function. Below is a short script demonstrating the issue I am having. I am using the most up to date version of Autoit and have tested the script on two separate computers so it shouldn't be due to another program already capturing that key. Does anyone know if this is a known issue with the current version of Autoit or if I am making a simple error somewhere in my script that is causing the issue. Pressing the { key will not capture { and instead just write { to the active application Pressing the } key will work and send "Works" to the console. HotKeySet("{", "_test") HotKeySet("}", "_test2") while 1 sleep (100) WEnd Func _test() ConsoleWrite ("Works") EndFunc Func _test2() ConsoleWrite ("Works") EndFunc "The true measure of a man is how he treats someone who can do him absolutely no good."
JohnOne Posted February 7, 2016 Posted February 7, 2016 I have no answer why { does not work, but I do have a work around. HotKeySet("+[", "_test") HotKeySet("}", "_test2") while 1 sleep (100) WEnd Func _test() ConsoleWrite ("Works") EndFunc Func _test2() ConsoleWrite ("Works") EndFunc AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
mikell Posted February 7, 2016 Posted February 7, 2016 Answer in the helpfile - Send() HotKeySet("{{}", "_test") while 1 sleep (100) WEnd Func _test() ConsoleWrite ("{ Works") EndFunc JohnOne 1
sias Posted February 7, 2016 Author Posted February 7, 2016 John, Thanks for the help. I'm just glad that it wasn't just me and I'm not actually going crazy (well, in regards to this at least). Thank you for the work around, I was so caught up on trying to get the { to work with hotkeyset or even _ispressed that my brain wouldn't even let me think about other solutions. "The true measure of a man is how he treats someone who can do him absolutely no good."
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