In Autohotkey, I want the key pressed to serve its original purpose, while executing some additional functions.
For example, upon pressing "^a", I'd like the "^a" to function as normal (e.g. Select All), and then send
another "word".
I tried to repeat the key being pressed, i.e. the following:
^a::
send, ^a
send, word
return
However, if I send the triggering keys (^a) again, the function will become "recursive" and never end.
AutoHotkey definitely does not have built-in recording capabilities--you would need to use a third party macro recorder if you don't want to just code the macro from scratch.
p::Pause ; Press Ctrl+Alt+P to pause.
To repeat a keystroke: Enclose in braces the name of the key followed by the number of times to repeat it. For example: Send "{DEL 4}" ; Presses the Delete key 4 times. Send "{S 30}" ; Sends 30 uppercase S characters.
$~^a::
The ~ will pass the ^a code through when the code is executed, so you don't even need to repeat the send, ^a.
I'm an Autohotkey beginner, but I think you use the "$" sign.
$^a::
send, ^a
send, word
return
This is usually only necessary if the script uses the Send command to send the keys that comprise the hotkey itself, which might otherwise cause it to trigger itself.
Hotkeys (Mouse, Joystick and Keyboard Shortcuts) > Introduction and Simple Examples > You can use the following > This is usually only
http://www.autohotkey.com/docs/Hotkeys.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With