Skip to content

Instantly share code, notes, and snippets.

@DaneWeber
Created June 8, 2015 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaneWeber/22c23f178501ac6fc6f7 to your computer and use it in GitHub Desktop.
Save DaneWeber/22c23f178501ac6fc6f7 to your computer and use it in GitHub Desktop.
#b:: ; Simulate typing of the text on the clipboard
KeyWait, LWin ; Ensure that the Windows key has been lifted.
KeyWait, RWin
ToPaste = %ClipBoard% ; Convert to text
Sleep 100
StringReplace, ToPaste, ToPaste, `r`n, `n, All ; Prevent CR+LF from causing two newlines
Sleep 100
SendRaw %ToPaste% ; SendRaw simulates typing the characters exactly, including AHK's special !^#+ characters
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment