Scratchers

Scratchers

评价数不足
AI Slop For The Lazies
由 masirozo 制作
AutoHotkey Mouse Position Clicker — Usage Guide

Hotkeys:

F5 — Add current mouse position to list
F6 — Remove last saved position
F7 — Play positions:
Scroll Lock ON: Loop over all positions
Scroll Lock OFF: Click each position once

F8 — Speed up clicking (interval -10%)
F9 — Slow down clicking (interval +10%)


How to Use:

Position your mouse, press F5 to save positions you want clicked.
Press F7 to start:
Toggle Scroll Lock ON before F7 to loop endlessly.
Toggle Scroll Lock OFF before F7 to click once through.

Press F7 again to stop (if looping).
Adjust speed anytime with F8/F9.
Press F6 to remove the last added position.


Note:
A tooltip displays current action or interval after each input.

Tip:
Press Scroll Lock key to toggle between looping and single play modes.
   
奖励
收藏
已收藏
取消收藏
Script
#NoEnv
#SingleInstance Force

coordArray := [] ; Stores mouse positions as objects {x:..., y:...}
mouseLoop := false ; Loop state
loopInterval := 1000 ; Initial interval in ms
playMode := "loop" ; "loop" or "once"
SetTimer, MouseClicker, Off

F5::
MouseGetPos, xpos, ypos
coordArray.Push({x: xpos, y: ypos})
ToolTip, Added: %xpos%, %ypos%
SetTimer, RemoveToolTip, -1000
return

F6::
if (coordArray.MaxIndex()) {
coordArray.Remove(coordArray.MaxIndex())
ToolTip, Removed last position
SetTimer, RemoveToolTip, -1000
} else {
ToolTip, Array is empty
SetTimer, RemoveToolTip, -1000
}
return

F7::
; Check ScrollLock
if (GetKeyState("ScrollLock", "T"))
playMode := "loop"
else
playMode := "once"

mouseLoop := !mouseLoop
if (mouseLoop && coordArray.MaxIndex() > 0) {
index := 1
if (playMode = "loop") {
SetTimer, MouseClicker, %loopInterval%
ToolTip, Looping (ScrollLock ON)
} else {
SetTimer, MouseClickOnce, -10
ToolTip, Playing Once (ScrollLock OFF)
}
SetTimer, RemoveToolTip, -1200
} else {
SetTimer, MouseClicker, Off
ToolTip, Stopped!
SetTimer, RemoveToolTip, -1000
}
return

F8:: ; Speed up (10%)
loopInterval := Ceil(loopInterval * 0.9)
if (mouseLoop && playMode = "loop")
SetTimer, MouseClicker, %loopInterval%
ToolTip, Interval: %loopInterval%ms
SetTimer, RemoveToolTip, -1000
return

F9:: ; Slow down (10%)
loopInterval := Ceil(loopInterval * 1.1)
if (mouseLoop && playMode = "loop")
SetTimer, MouseClicker, %loopInterval%
ToolTip, Interval: %loopInterval%ms
SetTimer, RemoveToolTip, -1000
return

MouseClicker:
if (coordArray.MaxIndex() = 0) {
ToolTip, Array empty, stopping loop
mouseLoop := false
SetTimer, MouseClicker, Off
SetTimer, RemoveToolTip, -1000
return
}
global index
; Loop idx
if (index > coordArray.MaxIndex())
index := 1
pos := coordArray[index]
MouseMove, pos.x, pos.y, 0
Click, left
index++
return

MouseClickOnce:
if (coordArray.MaxIndex() = 0) {
mouseLoop := false
ToolTip, Array empty
SetTimer, RemoveToolTip, -1000
return
}
global index
index := 1
Loop % coordArray.MaxIndex() {
pos := coordArray[A_Index]
MouseMove, pos.x, pos.y, 0
Click, left
Sleep, loopInterval
}
mouseLoop := false
return

RemoveToolTip:
ToolTip
return
2 条留言
Flare 8 月 2 日 下午 4:55 
i just use tinytask , it can record mouse/key inputs then repeat them with no code needed
masirozo  [作者] 6 月 28 日 下午 2:17 
only tested on windows