A simple videogame script...

Ask gaming related questions (AHK v1.1 and older)
jon166
Posts: 5
Joined: 20 Apr 2017, 10:32
Contact:

A simple videogame script...

20 Apr 2017, 10:39

So basically I want a key to push another key in a game a lot, in this case F7, so it hits W

Code: Select all

$F7::

    While ( GetKeyState( "F7","W" ) ) {

        Send, {F7 down}

        Sleep, 10

        Send, {F7 Up}

        Sleep, 50
    }

Return
I run it in administrator but when I hit F7 it doesn't work..
Can't understand why
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: A simple videogame script...

20 Apr 2017, 10:41

Where did you get "W" for the "Mode" parameter of GetKeyState? Try using "P".
jon166
Posts: 5
Joined: 20 Apr 2017, 10:32
Contact:

Re: A simple videogame script...

20 Apr 2017, 10:53

okay, well ichanged it to p,
i still can't get it to work in game though,

I try hitting w then f3 while holding w then letting go of w but f3 doesn't make it go..
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: A simple videogame script...

20 Apr 2017, 11:03

Your script is configured to use "F7" as the hotkey. Are you trying to use "W" and "F3" instead??
jon166
Posts: 5
Joined: 20 Apr 2017, 10:32
Contact:

Re: A simple videogame script...

20 Apr 2017, 11:07

yeah i mean i changed it all to f3 and then the w to p
jon166
Posts: 5
Joined: 20 Apr 2017, 10:32
Contact:

Re: A simple videogame script...

20 Apr 2017, 11:10

im using f3 now and hitting it but no dice
jon166
Posts: 5
Joined: 20 Apr 2017, 10:32
Contact:

Re: A simple videogame script...

20 Apr 2017, 14:14

I think I got it now I didn't assign it in game

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Shoobis and 53 guests