#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;************************************************************
; ONLY FOR 7D2D
;************************************************************
#IfWinActive, 7 Days To Die
;************************************************************
; ALT-R is autorun. W to stop.
;************************************************************
!r::
Send {w up}{w down}
return
;************************************************************
; ALT-M - Hold Down Left Mouse Button
;************************************************************
!m::
Click, Down
return
;************************************************************
; ALT-X - Loop on Left Mouse Button Clicks
;************************************************************
#MaxThreadsPerHotkey 3
!x::
#MaxThreadsPerHotkey 1
if KeepClicking ; This means an underlying thread is already running the loop below.
{
KeepClicking := false ; Signal that thread's loop to stop.
return ; End this thread so that the one underneath will resume and see the change made by the line above.
}
; Otherwise:
KeepClicking := true
Loop
{
Click
Sleep 750
; But leave the rest below unchanged.
if not KeepClicking ; The user signaled the loop to stop by pressing Win-Z again.
break ; Break out of this loop.
}
KeepClicking := false ; Reset in preparation for the next press of this hotkey.
return
;************************************************************
; ALT-9 - Click 100 times
;************************************************************
!9::
Loop, 100
{
Click
Sleep, 25
}
return
;************************************************************
; ALT-0 - Click 10 times
;************************************************************
!0::
Loop, 10
{
Click
Sleep, 25
}
return