Paste from clipboard adding % sign Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Paste from clipboard adding % sign

14 Nov 2018, 14:31

Paste from clipboard reinterprets "+" as "%". For example. If I copy the + symbol and try to paste it, the result will be %.
Please try it for yourself with the code below.
Copy this +
and paste it, it will turn into %.

Is this a bug? is there a workaround so I can paste the "+" symbol?

Code: Select all

^h::
send, %clipboard%
return
Thank you.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Paste from clipboard adding % sign

14 Nov 2018, 15:11

Try this:

Code: Select all

^h:: send, {Raw}%Clipboard%
I hope that helps.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Paste from clipboard adding % sign

14 Nov 2018, 15:22

- Send treats + as shift. ^ # ! for ctrl/win/alt. Also, { and } have a special meaning.
- Perhaps '+5' would give you '%'.
- Anyhow, to make each character be sent literally use {Text}.
- (There is also {Raw} in AHK v1, but not AHK v2.)

Code: Select all

q:: ;test send clipboard
Clipboard := "abc +5 def"
SendInput, % Clipboard ;abc % def
SendInput, {Enter}
SendInput, % "{Text}" Clipboard ;abc +5 def
SendInput, {Enter}
SendInput, % "{Raw}" Clipboard ;abc +5 def
SendInput, {Enter}
SendInput, ^v ;abc +5 def
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
SirSocks
Posts: 360
Joined: 26 Oct 2018, 08:14

Re: Paste from clipboard adding % sign  Topic is solved

15 Nov 2018, 08:24

jeeswg wrote:
14 Nov 2018, 15:22
- Send treats + as shift. ^ # ! for ctrl/win/alt. Also, { and } have a special meaning.
- Perhaps '+5' would give you '%'.
- Anyhow, to make each character be sent literally use {Text}.
- (There is also {Raw} in AHK v1, but not AHK v2.)

Code: Select all

q:: ;test send clipboard
Clipboard := "abc +5 def"
SendInput, % Clipboard ;abc % def
SendInput, {Enter}
SendInput, % "{Text}" Clipboard ;abc +5 def
SendInput, {Enter}
SendInput, % "{Raw}" Clipboard ;abc +5 def
SendInput, {Enter}
SendInput, ^v ;abc +5 def
return

Perfect! Thank you! :bravo:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], haomingchen1998, mikeyww and 233 guests