Hotstring - not Accepting Space as Ending Character

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
J63A7bqKgl
Posts: 5
Joined: 30 Jul 2017, 00:07

Hotstring - not Accepting Space as Ending Character

12 Aug 2017, 20:49

Basically, I'm assigning tasks to my team. Their tasks vary, so @respond hotstring should fire "Please proceed to " but no matter what I do, there's no space at the end.

Code: Select all

::@respond::
	setClipboardRP("Please proceed to ")
Return

setClipboardRP(response)
{
	ClipboardCurrent = %Clipboard%
	Clipboard=
	Sleep, 125
	Clipboard = %response%
	ClipWait
	Sleep, 125
	Send, ^v
	Sleep, 125
	Clipboard = %ClipboardCurrent%
}
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Hotstring - not Accepting Space as Ending Character

12 Aug 2017, 22:30

Try adding AutoTrim, Off like this:

Code: Select all

::@respond::
	setClipboardRP("Please proceed to ")
Return

setClipboardRP(response)
{
    AutoTrim, Off
	ClipboardCurrent = %Clipboard%
	Clipboard=
	Sleep, 125
	Clipboard = %response%
	ClipWait
	Sleep, 125
	Send, ^v
	Sleep, 125
	Clipboard = %ClipboardCurrent%
}
I hope that helps.
J63A7bqKgl
Posts: 5
Joined: 30 Jul 2017, 00:07

Re: Hotstring - not Accepting Space as Ending Character

12 Aug 2017, 23:47

wolf_II wrote:Try adding AutoTrim, Off like this:

Code: Select all

::@respond::
	setClipboardRP("Please proceed to ")
Return

setClipboardRP(response)
{
    AutoTrim, Off
	ClipboardCurrent = %Clipboard%
	Clipboard=
	Sleep, 125
	Clipboard = %response%
	ClipWait
	Sleep, 125
	Send, ^v
	Sleep, 125
	Clipboard = %ClipboardCurrent%
}
I hope that helps.
It sure did! Thanks!
Never heard of Autotrim before.

:salute:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: -Elaphe-, downstairs, Frogrammer, Google [Bot] and 259 guests