Skip to content

Instantly share code, notes, and snippets.

@munenedenis
Forked from henkman/autorun.au3
Created September 27, 2015 21:54
Show Gist options
  • Save munenedenis/72e83744a92396bdafb0 to your computer and use it in GitHub Desktop.
Save munenedenis/72e83744a92396bdafb0 to your computer and use it in GitHub Desktop.
Script to enable autorun for Dayz
; Autorun script for dayz
; Press HOME key once to start running
; Press END key to stop running
#include <Misc.au3>
Const $startRunning = "24"
Const $stopRunning = "23"
Local $user32 = DllOpen("user32.dll")
While True
If _IsPressed($startRunning, $user32) Then
While _IsPressed($startRunning, $user32)
Sleep(100)
WEnd
Send("{w down}")
ElseIf _IsPressed($stopRunning, $user32) Then
While _IsPressed($stopRunning, $user32)
Sleep(100)
WEnd
Send("{w up}")
EndIf
Sleep(100)
WEnd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment