ahka

Assorted ease-of-use and functionality tools using AutoHotkey.
Log | Files | Refs

commit 9d306241cee1ff710ef50610258f2716207ec1ae
parent 90407d6486bb6f0433f8a7c0164c085a7734abbd
Author: breadcat <peter@minskio.co.uk>
Date:   Thu, 26 Apr 2018 11:16:20 +0100

Revert pasteClipboard()

Regex method was a little over-enthusiastic.

Diffstat:
Mahk-assistant.ahk | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/ahk-assistant.ahk b/ahk-assistant.ahk @@ -601,9 +601,13 @@ appendClipboard() { } pasteClipboard() { ; manually paste clipboard, minus most formatting - pastedClipboard := RegExReplace(clipboard, "[\W_]+") ; remove underscores, non-numbers and non-letters - SendRaw %pastedClipboard% - pastedClipboard := + StringReplace, clipboard, clipboard, ?,, All ; remove bullet points + StringReplace, clipboard, clipboard, ·,, All ; remove middots + StringReplace, clipboard, clipboard, %A_Tab%,, All ; remove tabs + StringReplace, clipboard, clipboard, `r,, All ; remove half of line breaks + StringReplace, clipboard, clipboard, `n,, All ; remove other half of line breaks + clipboard = %clipboard% ; trim whitespace + SendRaw %clipboard% Return }