Little help with simple code

Ask gaming related questions (AHK v1.1 and older)
rastafarai
Posts: 1
Joined: 23 May 2017, 17:03

Little help with simple code

23 May 2017, 17:11

Guys sorry i already tried, but doesnt work in game.

$RButton::
While GetKeyState("RButton","P")
send {F12}
Return

Id like a hotkey when i keep right button pressed for 0.70ms he send a f12 input just one time. Its for SA-MP, i tried with this code but he dont even send the f12 input to game.

I really appreciate the help.
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Little help with simple code

23 May 2017, 17:22

That's the code to repeatedly send a key, not code for a "long press", which is more complicated / you often have to make concessions.

That code SHOULD send F12 to the game, so if it doesn't, then there seems to be a problem with AHK sending to the game, period.

Try adding SetKeyDelay, 0, 50 to the start of the script, and try running the script as admin.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 91 guests