Hi,
I'm inside the function that handles a hotstring. I want to see the hotstring exactly as it was typed, so I could know which letters where capitalized and which weren't. A hotstring like "btw" could be typed "Btw" or "BTW" or "bTW". Does AHK let me access that inside a function that handles a hotstring?
Thanks,
Ram.
Access to hotstring typed
Started by
cool-RR
, Jul 19 2012 07:18 PM
5 replies to this topic
#1
Posted 19 July 2012 - 07:18 PM
#2
Posted 19 July 2012 - 08:22 PM
Sure, well what you would do is make a list of your *case-sensitive* hotkey for your hotstring like so...
The prefix
You have to do a SubString to overlook the
:C:Btw:: :C:BTW:: :C:bTW:: :C:BTw:: :C:btw:: MsgBox % "You typed " SubStr(A_thishotkey, 4) return
A_ThisHotkey is a built-in variable containing the hotkey that triggered the current thread.The prefix
:C: is to make the hotstring case-sensitve.You have to do a SubString to overlook the
:C: prefix of the hotkey.
#3
Posted 19 July 2012 - 08:50 PM
Thank you, but that does not solve the problem. I want to get the exact form that the hotstring was typed in *without* having to list all the permutations like that.
#4
Posted 19 July 2012 - 09:13 PM
Alright, in that case you would use the Input command like so...
#SingleInstance Force Input, Typed, V,,btw If (ErrorLevel = "Match") MsgBox You pressed %Typed%
#5
Posted 19 July 2012 - 10:20 PM
I'm inside the function that handles a hotstring. I want to see the hotstring exactly as it was typed, so I could know which letters where capitalized and which weren't. A hotstring like "btw" could be typed "Btw" or "BTW" or "bTW". Does AHK let me access that inside a function that handles a hotstring?
The capability does not exist. Characters are converted to lower case.
#6
Posted 20 July 2012 - 01:42 PM
Thanks everybody!




