Skip to content

Instantly share code, notes, and snippets.

@4rc0s
Created November 7, 2011 16:29
Show Gist options
  • Save 4rc0s/1345441 to your computer and use it in GitHub Desktop.
Save 4rc0s/1345441 to your computer and use it in GitHub Desktop.
Paste clipboard as plain text without losing original content
;;----------------------
;; PASTE CLIPBOARD AS
;; PLAIN TEXT
;;----------------------
#v::
ClipSaved := ClipboardAll ; Save original clipbaord
ClipBoard = %ClipBoard% ; Convert to plain text
Send ^v ; For best compatibility: SendPlay
Sleep 50 ; Don't change clipboard while it is pasted! (Sleep > 0)
ClipBoard = %ClipSaved% ; Restore original ClipBoard
ClipSaved = ; Free memory
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment