Space to trigger hotstring/hotkey? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Bernd
Posts: 56
Joined: 03 Sep 2016, 13:56

Space to trigger hotstring/hotkey?

15 May 2021, 06:11

I want to add an internal variable to Space whenever it is typed.

Code: Select all

:?c*:Space::
	{
	SendInput %A_Space%
	x = _
	}
return
and

Code: Select all

:?c*:Space::
	{
	SendInput {Space}
	x = _
	}
return
do not work.

Code: Select all

Space::
	{
	SendInput %A_Space%
	x = _
	}
return

Code: Select all

Space::
	{
	SendInput {Space}
	x = _
	}
return
work in principle, (i.e. I don't have to escape the _) but cause a runaway trigger.
Bernd
Posts: 56
Joined: 03 Sep 2016, 13:56

Re: Space to trigger hotstring/hotkey?  Topic is solved

15 May 2021, 06:15

Update: It works when you add $ (to inhibit the self-triggering):

Code: Select all

$Space::
	{
	SendInput {Space}
	x = _
	}
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: inseption86, jaka1, metallizer, Rohwedder and 312 guests