Repress W after pressing E

Ask gaming related questions
Raudys
Posts: 2
Joined: 13 Sep 2020, 15:48

Repress W after pressing E

13 Sep 2020, 16:12

Hello I tried everything and I cant get my code to work.
It should lift up W key and press and hold it down after I press E, but only if I was holding W in the first place.
Pretty confusing i know, but here's the code:

Code: Select all

e DOWN::
	send {e down}
	if !GetKeyState("w", "P")
		sleep 50
		send {w up}
		send {w down}
Return
I tried for too long can someone who actually knows how to akh tell me whats wrong...
Rohwedder
Posts: 3512
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Repress W after pressing E

14 Sep 2020, 03:40

Hallo,
perhaps:

Code: Select all

~e:: ;E key retains its function
IF GetKeyState("w","P") ;If W is down
{
	sleep 50
	Send {w Up}
	Send {w down}
}
Return
Raudys
Posts: 2
Joined: 13 Sep 2020, 15:48

Re: Repress W after pressing E

21 Sep 2020, 06:25

Thanks!

Return to “Gaming”

Who is online

Users browsing this forum: spaceplusframes and 12 guests