A list of keys when mouse move stops Topic is solved

Ask gaming related questions
LuanMts
Posts: 18
Joined: 24 May 2020, 00:36

A list of keys when mouse move stops

10 Sep 2020, 01:11

I want to send a lst of keys repeatedly when te cursor stops. For example: "p + 10 ms p" a lot of times during the mouse is stopped.

Thanks for the attention!

[Mod edit: Moved from Scripts and Functions > Gaming' to 'Ask For Help > Gaming'. ]
Rohwedder
Posts: 3785
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: A list of keys when mouse move stops  Topic is solved

10 Sep 2020, 03:02

Hallo,
try:

Code: Select all

#InstallMouseHook
*q::SetTimer Tq,% (Tq:=!Tq)?10:"Off" ;On/Off with key Q
Tq:
SendInput,% A_TimeIdleMouse>400?"p": ;If mouse was stopped > 400ms
Return
LuanMts
Posts: 18
Joined: 24 May 2020, 00:36

Re: A list of keys when mouse move stops

11 Sep 2020, 01:52

Ok, and if I want to send "p" just one time when the mouse move stops for 400 how i do?

Thank you a lot!
LuanMts
Posts: 18
Joined: 24 May 2020, 00:36

Re: A list of keys when mouse move stops

11 Sep 2020, 02:18

And if I need keep pressed the letter "p" while the mouse is stopped How i do?
Rohwedder
Posts: 3785
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: A list of keys when mouse move stops

11 Sep 2020, 03:04

send "p" just one time when the mouse move stops for 400:

Code: Select all

#InstallMouseHook
*q::SetTimer Tq,% (Tq:=!Tq)?100:"Off" ;On/Off with key Q
Tq:
IF A_TimeIdleMouse between 350 and 450
{
	Send, p
	Sleep, 100
}
Return
And bye!

Return to “Gaming”

Who is online

Users browsing this forum: Google [Bot], xLegxnd_ and 19 guests