Page 1 of 1

Gaming script with native key hold

Posted: 18 Nov 2016, 11:02
by shaunr1
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

Re: Gaming script with native key hold

Posted: 23 Nov 2016, 06:16
by evilC
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.

Re: Gaming script with native key hold

Posted: 23 Nov 2016, 16:54
by just me
evilC wrote:You posted in the wrong section, this belongs in "Ask for Help"
Why?

Re: Gaming script with native key hold

Posted: 24 Nov 2016, 07:23
by evilC
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?

Re: Gaming script with native key hold

Posted: 24 Nov 2016, 16:26
by just me
Gaming script with native key hold
:!:

Re: Gaming script with native key hold

Posted: 25 Nov 2016, 08:43
by John
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).

Re: Gaming script with native key hold

Posted: 25 Nov 2016, 08:54
by evilC
Oh, so it was, had me doubting myself there... ;)