#IfWinActive, DayZ
ALT & F::
If State=50
State=Off
else
State=50
SetTimer SendKey, %State%
Return
SendKey:
Send F
Return
Spam Key only active while holding buttons
-
- Posts: 1
- Joined: 14 Jun 2018, 15:06
Spam Key only active while holding buttons
I have searched a bit and cant seem to find what I am looking for. I will post my code and see if someone can help me a bit with the proper format. I copied code from another post and it works but its too fast, I would almost prefer the spam to be half of what it is presently. I was also looking to get the hotkeys to only run with the game window open, but if thats not possible no biggie.
Re: Spam Key only active while holding buttons
Give this a try:
HTH
Code: Select all
#NoEnv
speed := 100 ; Change this value to speed up or slow down the timer intervals. (100msec = 1/10sec 1000msec = 1sec)
WinTitle := "DayZ" ; Make sure this matches the window title or the hotkey/send will not work
#IfWinActive, % WinTitle
$!F::SetTimer, SendKey, % (Toggle := !Toggle) ? speed : "Off" ; Toggle the timer on/off
SendKey:
if WinActive(WinTitle) ; If the timer is running and the window is active send the key otherwise do nothing
Send F
Return
Who is online
Users browsing this forum: Bing [Bot] and 30 guests