Reputation: 643
I'm newbie in AutoHotKey, I try to use SendInput to input 3 Characters by Chr
like this
^Numpad1::
SendInput %Chr(44) %Chr(8451) %Chr(12290)
Return
I don't know how to implement it and I don't want to use three SendInput
to do this, I mean whether the Chr
and the SendInput
can be a same line. Is this possible?
Upvotes: 1
Views: 367
Reputation: 12194
Edit: I found a way how to do it on single line, without variable or Return
:
^Numpad1::SendInput % Chr(44)Chr(8451)Chr(12290)
Remember, you can still avoid most codes and immediately see meaning of your definitions. Use Character Map application to get the characters directly, then put them into the file. Numbers rarely have a benefit over directly written symbols. Just ,
(comma) needs escaping to {,}
:
`Numpad1::SendInput {,}℃。
Upvotes: 1
Reputation: 3366
Use expression mode:
^Numpad1::
SendInput % Chr(44) Chr(8451) Chr(12290)
Return
%
followed by a space
causes the parameters to be evaluated as an expression
Upvotes: 1