loop and shift problem

Get help with using AutoHotkey and its commands and hotkeys
Joo Se Hyuk
Posts: 59
Joined: 05 Sep 2016, 12:52

loop and shift problem

10 Feb 2019, 22:29

hi all, i have a problem with my script
i wanna do a loop, it works fine, but when i start it and i physicaly holding down the shift key at the same time, the script sending shifts (idk why)
i use it in a game, and shift is crounch, and i crounch and stand up,crounch and stand up but only when i holding down the shift and press right mouse button to start my loop.
how i can disable my shift key spaming when i already holding down shift? or any other solution?
ty any help, this is my script:

*$~rbutton::

send v

send f

send n
sleep 10
mouseXY(moveAmount,78)

If not GetKeyState("shift") {

mouseXY(moveAmount,-10)

send {c DOWN}
}

Loop
If GetKeyState("rButton") {

sleep 147
send v
sleep 1
send v
sleep 1
send v
mouseXY(moveAmount,60.7)
}
else

{

send f
send {c up}
send m
send ü
sleep 3

break
}
return
Rohwedder
Posts: 1739
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: loop and shift problem

11 Feb 2019, 05:08

Hallo,
only a try:

Code: Select all

*$rbutton::
Send {Rbutton Down}
send v
send f
send n
sleep 10
mouseXY(moveAmount,78)
If not GetKeyState("shift","P")
{
	mouseXY(moveAmount,-10)
	send {c DOWN}
}
Loop
	If GetKeyState("rButton","P")
	{
		sleep 147
		send v
		sleep 1
		send v
		sleep 1
		send v
		mouseXY(moveAmount,60.7)
	}
	else
	{
		Send {Rbutton Up}
		send f
		send {c up}
		send m
		send ü
		sleep 3
		break
	}
return
Joo Se Hyuk
Posts: 59
Joined: 05 Sep 2016, 12:52

Re: loop and shift problem

14 Feb 2019, 09:24

i try, not good :(

Return to “Ask For Help”

Who is online

Users browsing this forum: g0ss, Odlanir and 208 guests