Sign in to follow this  
Followers 0
TurboDragon

Problem with HotKeySet for Right Brace "}"

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



try

   $x = Chr(125)
   Hotkeyset("{" & $x & "}","capture_rbrk")

E.


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

Share this post


Link to post
Share on other sites

Many thanks, but unfortunately, that doesn't work either. 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

what ? that's right out of the helpfile .... ?

maybe you found a bug .... ?

Edited by Edano

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

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
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
Sign in to follow this  
Followers 0