Gaming script with native key hold

Ask gaming related questions (AHK v1.1 and older)
shaunr1
Posts: 1
Joined: 18 Nov 2016, 10:46

Gaming script with native key hold

18 Nov 2016, 11:02

I'm currently using the script below to activate 1 key press then spam another button until I release the trigger key.

Is it possible to have the secondary action (hold b key) work like a native key hold, as the timer method below is not working ideal for my application?


$Rbutton::
while GetKeyState("Rbutton", "P")
{
if(GetKeyState("Enter", "P"))
break

sendinput, {a}
RandomSleep(250,300)

While GetKeyState("Rbutton", "P")
{

sendinput , {b}
RandomSleep(250,300)

}
}
return
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Gaming script with native key hold

23 Nov 2016, 06:16

You posted in the wrong section, this belongs in "Ask for Help"
Is it possible to have the secondary action (hold b key) work like a native key hold
"Native"?
There is nothing in this script that holds b - the command sendinput , {b} presses and then releases b.
I think you need to explain your requirements more clearly.
just me
Posts: 9442
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Gaming script with native key hold

23 Nov 2016, 16:54

evilC wrote:You posted in the wrong section, this belongs in "Ask for Help"
Why?
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Gaming script with native key hold

24 Nov 2016, 07:23

just me wrote:
evilC wrote:You posted in the wrong section, this belongs in "Ask for Help"
Why?
Because he is asking for help?
Is it possible to have the secondary action (hold b key) work like a native key hold, as the timer method below is not working ideal for my application?
just me
Posts: 9442
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Gaming script with native key hold

24 Nov 2016, 16:26

Gaming script with native key hold
:!:
John
Posts: 78
Joined: 10 Apr 2014, 08:59

Re: Gaming script with native key hold

25 Nov 2016, 08:43

just me wrote:
Gaming script with native key hold
:!:
..and it was in "Scripts and Functions -> Gaming", not in the "Ask for Help -> Gaming".
Clearly just a simple misunderstanding so could maybe just let it fade away with the other inactive questions (until he decides to specify what he actually meant with what he needed help with).

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 42 guests