Arrow Key and Enter Key wont work

Ask gaming related questions (AHK v1.1 and older)
Rinlas
Posts: 2
Joined: 19 Oct 2017, 17:39

Arrow Key and Enter Key wont work

19 Oct 2017, 18:07

Hello Community,

i wrote my first Script for a Game GTA. It is super buggy tho. After the Y Key the Script stops working. Only one time the first Down-Arrow Key worked. The Enter Key never worked. That means, the Key is not blocked, is it?

I tried to write the Script with "ControlSend" but i really dont know how to write the Script with this Command. I tried it, but the Script wont work completely. Maybe it will work with that.

Yes the Game is in Windowed Mode and i Run it as a Administrator. I also tried "SetKeyDelay 0, 200" but it didnt change anything. Can someone help pls?

Code: Select all

Numpad9::
loop, 8
    {
Send {E}
Sleep 11000
Send {E}
Sleep 11000
Send {Y}
Sleep 500
Send {Down}
Sleep 500
Send {Down}
Sleep 500
Send {Enter}
Sleep 500
Send {Down}
Sleep 500
Send {Enter}
Sleep 500
Send {Enter}
Sleep 500
Send {Left}
Sleep 500
Send {Down}
Sleep 500
Send {Enter}
Sleep 500

}
return
THIS is my try for a ControlSend Test, but this dosnt even work in the Editor or other Word.

Code: Select all

SetKeyDelay, 100, 100

Numpad9::
loop, 8
{
ControlSend E
Sleep 11000
ControlSend E
Sleep 11000
ControlSend Y
Sleep 500
ControlSend {down}
Sleep 500
ControlSend {down}
Sleep 500
ControlSend {enter}
Sleep 500
ControlSend {down}
Sleep 500
ControlSend {enter}
Sleep 500
ControlSend {enter}
Sleep 500
ControlSend {left}
Sleep 500
ControlSend {down}
Sleep 500
ControlSend {enter}
Sleep 500
}
return
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: Arrow Key and Enter Key wont work

19 Oct 2017, 21:57

ControlSend needs more parameters to work, but let's worry about getting Send to work at all. ControlSend is often harder to use and less likely to work nicely.

So when you do Send {E} what actually happens is Send +{e}, because you make a capital letter, you usually need to press Shift. So that may have unintended interference with your game. Or alternatively, it actually makes your game/script work when the shift is sent as well.

The capitalized Down and Enter should not produce a shift key stroke.

That's that extent of potential issues I see in your code; it's otherwise just fine.
Rinlas
Posts: 2
Joined: 19 Oct 2017, 17:39

Re: Arrow Key and Enter Key wont work

20 Oct 2017, 03:34

Ok so what is the Problem here? What should i change so the Arrow and Enter Key starts working?

i tried to use the "small" e and y, this keys still work, but it stops working at the arrow and the enter key dosnt work either....
Holding Shift didnt work either
User avatar
Exaskryz
Posts: 2882
Joined: 17 Oct 2015, 20:28

Re: Arrow Key and Enter Key wont work

20 Oct 2017, 22:12

The only thing I notice is that you wait 11 seconds between the E and E presses, and the E and Y presses. But then when it reaches the first Down arrow key, you only waited 500 milliseconds. Can you verify the script works fine outside of games, like in a text editor? (You can make like a dozen lines, and set your cursor at the top to test that it can do Down presses correctly.) My suspicion is that even 500 milliseconds is too fast for your game, like it's not ready for those inputs for whatever reason.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 82 guests