Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Problem with HotKeySet for Right Brace "}"

$
0
0

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.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>