I want to be able to run a script when typing a certain sequence of characters.
For example:
Hold Alt (!), then type A, type B, Type C. (Not all together, one after the other)
My idea was to create a hotkey for !A:: then check if B and C are typed in a certain timespan. If a key other then b is being pressed, exit the script.
Now my question is: How do I check if a Key is being pressed in X ms? Is there a better way to do this whole thing that I just dont know of? Thanks in advance.
Create a hotkey for a series of inputs Topic is solved
Re: Create a hotkey for a series of inputs Topic is solved
Hallo,
try:
try:
Code: Select all
!a::
EndTime := A_TickCount + 3000 ;max. timespan 3 seconds
Keys = a
Loop
{
Input, Key, ML1T.2
Keys .= Key
}
Until (A_TickCount > EndTime) Or !InStr("ab",Keys)
If Keys = abc
MsgBox, True
Else
MsgBox, False
Return
Who is online
Users browsing this forum: Google [Bot] and 65 guests