not use key w

Ask gaming related questions (AHK v1.1 and older)
Magnusnordic
Posts: 7
Joined: 22 Apr 2021, 14:55
Contact:

not use key w

22 Apr 2021, 14:59

hope i will help would like an autohotkey script where it stops me from using 2 key for 2 minutes
hope you can help
Last edited by gregster on 22 Apr 2021, 15:36, edited 1 time in total.
Reason: Topic moved to 'Ask For Help > Gaming' (from "Scripts and Functions > ...")
User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: not use key w

22 Apr 2021, 18:59

Code: Select all

F3::
off := True
SoundBeep, 1500
SetTimer, Done, % -1000 * 60 * 2
Return
Done:
off := False
SoundBeep, 1000
Return
#If off
w::
s::Return
#If
Magnusnordic
Posts: 7
Joined: 22 Apr 2021, 14:55
Contact:

Re: not use key w

23 Apr 2021, 07:56

@mikeyww
thanks so it stop so i can not use w key for 2 minutes?
User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: not use key w

23 Apr 2021, 08:50

Right, but you need not take my word for it. Test it and see.

This also applies to s, as an example. You can change that as you like.
Magnusnordic
Posts: 7
Joined: 22 Apr 2021, 14:55
Contact:

Re: not use key w

25 Apr 2021, 04:15

@mikeyww
when I run script I can still use w key when it is that I should not be able to use w key
User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: not use key w

25 Apr 2021, 06:06

F3 activates the block, which will last for two minutes.
Magnusnordic
Posts: 7
Joined: 22 Apr 2021, 14:55
Contact:

Re: not use key w

26 Apr 2021, 12:53

@mikeyww
can we do so I do not have to press F3 down before it starts
User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: not use key w

26 Apr 2021, 13:09

Just remove the first line.
Magnusnordic
Posts: 7
Joined: 22 Apr 2021, 14:55
Contact:

Re: not use key w

26 Apr 2021, 14:07

@mikeyww
just remote F3::
User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: not use key w

26 Apr 2021, 14:30

Yes. That will enable the code to execute when you run the script, without a hotkey.
Magnusnordic
Posts: 7
Joined: 22 Apr 2021, 14:55
Contact:

Re: not use key w

28 Apr 2021, 09:38

@mikeyww
can we do so I do not get this message here all the time

Image
[Mod edit: Image fixed.]
User avatar
mikeyww
Posts: 26857
Joined: 09 Sep 2014, 18:38

Re: not use key w

28 Apr 2021, 11:29

Sure, you could certainly follow the instructions in that message if you like. One option is to add:

Code: Select all

#SingleInstance Force

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 39 guests