Skip to content

Instantly share code, notes, and snippets.

@binki
Created March 2, 2016 22:47
Show Gist options
  • Save binki/d9fa17be024c34d99042 to your computer and use it in GitHub Desktop.
Save binki/d9fa17be024c34d99042 to your computer and use it in GitHub Desktop.
SendInput() compatible with mstsc, using AutoHotKey
; Run with START /WAIT to wait for the keys to be sent.
; I think Process has options for that in .net
; Be compatible with mstsc and just work better™?
SendMode Input
; Rudimentary support for sending a chunk of chars, sending four chars at once instead of 1 probs will feel like a major speedup
; I’m using ordinals because just sending numerals as arguments avoids all that
; potential escaping nightmare. Is simple to code against.
a1 = %1%
if (a1) {
c := Chr(a1)
}
a2 = %2%
If (a2) {
c := c . Chr(a2)
}
a3 = %3%
If (a3) {
c := c . Chr(a3)
}
a4 = %4%
If (a4) {
c := c . Chr(a4)
}
Send % c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment