Is it possible to recall which letters have been pressed last whether they were sent via keyboard or a script? Perhaps something similar to A_priorkey but just a certain subset of letters. I'm not quite sure where to begin with this one.
E.g.
I want the last pressed of either a or b. If I typed "absdkfjkj" it would produce b instead of j. Ultimately it will be used to send additional letters according to whether a or b came more recently.
Recall last letter pressed among a certain set of letters Topic is solved
-
- Posts: 44
- Joined: 18 Aug 2016, 22:56
Re: Recall last letter pressed among a certain set of letters Topic is solved
probably a better way, but maybe something like this?
Code: Select all
LoggedKeys := ["A","B","Z"]
for k, v in LoggedKeys
Hotkey, % "~"LoggedKeys[k], LogKey
LogKey:
LastLoggedKey := StrReplace(A_ThisHotkey, "~")
ToolTip % LastLoggedKey
return
Re: Recall last letter pressed among a certain set of letters
Was able to build on your foundation to piece together exactly what I had envisioned to create at the start. Also had a few ah HA, eureka learning moments while doing so. Thanks for that.