Skip to content

Instantly share code, notes, and snippets.

@samr7
Created February 20, 2020 23:04
Show Gist options
  • Save samr7/af684dcb3cdfa261f72d1d172f9f79b8 to your computer and use it in GitHub Desktop.
Save samr7/af684dcb3cdfa261f72d1d172f9f79b8 to your computer and use it in GitHub Desktop.
Auto Hot Key typing simulator (ctrl-shift-V to pretend to type clipboard)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#NoTrayIcon ; Hide the tray icon
SlowType(str) {
len := StrLen(str)
Loop, %len% {
xchar := SubStr(str, A_Index, 1)
if (xchar == chr(13)) {
continue
}
last := char
char := xchar
SendRaw %char%
if (char == chr(10) && last == chr(10)) {
Sleep, 750
}
if (char == chr(32)) {
Sleep 100
}
Random, rand, 10, 100
Sleep, rand
}
}
^+v::SlowType(Clipboard)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment