diff --git a/clicker.ahk b/clicker.ahk new file mode 100644 index 0000000..cb271a6 --- /dev/null +++ b/clicker.ahk @@ -0,0 +1,38 @@ +SetBatchLines -1 ; Ensures maximum effectiveness of this method. +CoordMode, Mouse, Screen +fname := A_ScriptDir . "\on" +SendMode Input +cont := true +val = %1% +d := Round(1000 / val) +If (!FileExist(fname)) { + FileAppend,"",%fname% +} +SendEvent {Tab} +TimePeriod = 1 +SleepDuration = 1 +Sleep 1000 +DllCall("Winmm\timeBeginPeriod", UInt, TimePeriod) +while cont +{ + GetKeyState, finished,Space,P + if finished = D + { + cont := false + ExitApp 0 + } + else + { + DllCall("Sleep", UInt, d) + Click + } +} +DllCall("Winmm\timeEndPeriod", UInt, TimePeriod) +Tab:: + If (FileExist(fname)) { + FileDelete,%fname% + } + else { + FileAppend,"",%fname% + } + Pause,Toggle,1