David
Joined: 08 Aug 2004 Posts: 25 Location: Lubbock, Texas
|
Posted: Sat Dec 15, 2007 12:30 am Post subject: Not another autoclicker?!? |
|
|
Nothing fancy here, just wanted to share something simple I wrote for my own use, to keep the callous on my index finger from getting any bigger.
| Code: | ; AutoMouseClick.ahk
; Automatically clicks (double-clicks w/Shift down) left mouse button
; every x seconds unless Ctrl down or mouse hasn't moved 3 pixels in any direction
#Persistent
InputBox, Int, Mouse Click Interval, Number of seconds between mouse clicks:,,,,,,,,5
CoordMode, Mouse, Screen
MouseGetPos, MouseX, MouseY
If ErrorLevel <> 0
ExitApp
If Int =
ExitApp
EnvMult, Int, 1000
SetTimer, ClickIt, %Int%
Return
ClickIt:
If Not (GetKeyState("Ctrl")) {
MouseGetPos, X, Y
If (Abs(X - MouseX) > 3 Or Abs(Y - MouseY) > 3)
{
If (GetKeyState("Shift"))
MouseClick, Left,,,2
Else
MouseClick
MouseX := X
MouseY := Y
}
}
Return |
|
|