AutoHotkey : Copying without formatting

One of the common annoyances of copy-pasting on Windows is that it tries to copy-paste the formatting as well. This issue can easily be fixed by the following AutoHotkey macro, which will copy the selection to the clipboard as pure text.

?Download macro.ahk
;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copy without formatting
;;;;;;;;;;;;;;;;;;;;;;;;;;
^Ins::
	Clipboard =    ; Purge Clipboard content
	Send ^{Ins}  ; Send the Ctrl+Insert command
	ClipWait        ; Wait till data is present in the Clipboard
	Clipboard = %clipboard%    ;remove formatting
Return

That’s it. When hitting CTRL-Insert, the selection will be copied into the clipboard without formatting.

I am aware there are other ways around this problem, most stripping the formatting when pasting, but I had little success with them.

What are your favorite AutoHotkey hacks ?

One thought on “AutoHotkey : Copying without formatting”

  1. Absolutely great. Just about to write an Autohotkey script to copy and paste the text to notepad and copy back out of there (which is how I normally handle this problem) and thought I would first look around and see if anyone else has addressed this. Your script works perfectly and not the hack solution I was about to write. Thanks for this.

Leave a Reply

Your email address will not be published. Required fields are marked *