Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
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.
a
ab
b
c
You can use ~a::b as a sign of "send a through, then send b".
~a::b
If you are to use that three line method - you would need to use $ to avoid infinite a:: firing:
$
a::
$a:: Send {a}{b} Return
This works as expected.
Add a comment
Use this
~a::b b::c
You can also do
Both work, but first is cleaner.
Fixed a bug.
bbbbbbbbbbbbbb...
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.