Created
March 2, 2016 22:47
-
-
Save binki/d9fa17be024c34d99042 to your computer and use it in GitHub Desktop.
SendInput() compatible with mstsc, using AutoHotKey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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