Pasting as plain text in Windows 10 using AHK

Associate
Joined
10 Apr 2008
Posts
2,491
MacOS allows you to do this with a simple shortcut, but on Windows I'm having to use AutoHotKey with this script:

$^v:: ClipSaved := ClipboardAll ;save original clipboard contents clipboard = %clipboard% ;remove formatting Send ^v ;send the Ctrl+V command Clipboard := ClipSaved ;restore the original clipboard contents ClipSaved = ;clear the variable Return $^+v:: Send ^v ;just send the regular paste command Return

From here: https://lifehacker.com/5388814/better-paste-takes-the-annoyance-out-of-pasting-formatted-text

Problem is whenever I paste using with this script active, the last line of every paragraph is inserted with a line break. Does anyone know what the problem might be? I've tried multiple scripts and this bug is really annoying. Happens with all of them.
 
Various things. PDFs usually. Sometimes web pages. In theory it shouldn't matter though because any formatting is supposed to be gone.

I used to run a similar script on Windows 7 before I moved to MacOS, no problems.
 
Back
Top Bottom