Jump to content

Problem with HotKeySet for Right Brace "}"


Go to solution Solved by Edano,

Recommended Posts

I get very idiosyncratic behavior when I try to do a HotKeySet for Right Brace "}". HotKeySet() works for every other key except Right Brace "}" But for Right Brace "}" it doesn't seem to register. I think there might be a small bug in the system. Please see the code below: 

HotKeySet("{}}", "capture_rbrk")

Func capture_rbrk()
    LogFile("}")  
    HotKeySet("{}}")
    Send("{}}")
    HotKeySet("{}}", "capture_rbrk")
 EndFunc
 
 

Please note I also tried HotKeySet("}", "capture_rbrk") and HotKeySet(chr(125),"capture_rbrk") but things went from bad to worse.

 
My educated guess is that when the system encounters "{}}" it strips off the first left brace "{" and then reads until it hits the first right brace "}". It therefore thinks the bracketed string is "null". If this is the case, a better way might be to strip off the leftmost brace and the rightmost brace, and then deal with whatever's left over in the middle. 
 
On the other hand, I'm new to AutoIT, so I may have overlooked something obvious. Apologies in advance if that was the case.
Link to comment
Share on other sites

  • Solution

another try, on my keyboard, "}" is altgr+0 (zero). so i would try

HotKeySet("^!0","capture_rbrk")

depending on your keyboard

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...