Reputation: 43
I am trying to make a script that would fire a key if it comes from user, but not from script in AutoHotKey.
How can achieve this:
if a
is pressed - ab
is typed. if b
is pressed - c
is fired.
Upvotes: 2
Views: 351
Reputation: 1431
You can use ~a::b
as a sign of "send a through, then send b".
If you are to use that three line method - you would need to use $
to avoid infinite a::
firing:
$a::
Send {a}{b}
Return
This works as expected.
Upvotes: 2
Reputation: 21
Use this
~a::b
b::c
You can also do
$a::
Send {a}{b}
Return
Both work, but first is cleaner.
Fixed a bug.
Upvotes: 2