Last active
August 29, 2015 14:22
-
-
Save DaneWeber/966f81fc627b05113055 to your computer and use it in GitHub Desktop.
This file contains 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
; Copied from http://www.autohotkey.com/board/topic/10412-paste-plain-text-and-copycut/ | |
#v:: ; Text–only paste from ClipBoard | WIN and V keys are the hotkey | |
KeyWait, LWin ; Wait for the Windows key to be lifted, | |
KeyWait, RWin ; since it would sometimes combine with the pasted text. | |
OldClip = %ClipBoardAll% ; Save formatted text for later | |
ClipBoard = %ClipBoard% ; Convert to text | |
Send ^v ; For best compatibility: SendPlay | simulates pressing CRTL and V keys | |
Sleep 50 ; Don't change clipboard while it is pasted! (Sleep > 0) | |
ClipBoard = %OldClip% ; Restore original ClipBoard | |
VarSetCapacity(OldClip, 0) ; Free memory | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment