summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbreadcat2019-02-06 12:46:40 +0000
committerbreadcat2019-02-06 12:46:40 +0000
commit6b2f0e047afd0e97ebb75f24c788e581c53ab431 (patch)
tree305cdc5572d569ef2d1280b1dc07d23c805621d4
parentfafb8c969c01d4299629e991f36fdadb672acfd1 (diff)
downloadahka-6b2f0e047afd0e97ebb75f24c788e581c53ab431.tar.gz
ahka-6b2f0e047afd0e97ebb75f24c788e581c53ab431.tar.bz2
ahka-6b2f0e047afd0e97ebb75f24c788e581c53ab431.zip
Alter pasteClipboard function
Now uses new tempClipboard variable to stop messing with existing clipboard. Also replaces +44 international dialling code.
-rw-r--r--ahk-assistant.ahk19
1 files changed, 11 insertions, 8 deletions
diff --git a/ahk-assistant.ahk b/ahk-assistant.ahk
index 07632e2..660843c 100644
--- a/ahk-assistant.ahk
+++ b/ahk-assistant.ahk
@@ -597,14 +597,17 @@ appendClipboard() {
}
pasteClipboard() { ; manually paste clipboard, minus most formatting
- 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, /,%A_Space%, All ; forward slashes mess up linux paths
- StringReplace, clipboard, clipboard, `n,, All ; remove other half of line breaks
- clipboard = %clipboard% ; trim whitespace
- SendRaw %clipboard%
+ tempClipboard = %clipboard%
+ StringReplace, tempClipboard, tempClipboard, ?,, All ; remove bullet points
+ StringReplace, tempClipboard, tempClipboard, ·,, All ; remove middots
+ StringReplace, tempClipboard, tempClipboard, %A_Tab%,, All ; remove tabs
+ StringReplace, tempClipboard, tempClipboard, /,%A_Space%, All ; forward slashes mess up linux paths
+ StringReplace, tempClipboard, tempClipboard, +44,0, All ; remove international dialling code without a space
+ StringReplace, tempClipboard, tempClipboard, `r,, All ; remove half of line breaks
+ StringReplace, tempClipboard, tempClipboard, `n,, All ; remove other half of line breaks
+ tempClipboard = %tempClipboard% ; trim whitespace
+ SendRaw %tempClipboard%
+ tempClipboard =
Return
}