AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Not another autoclicker?!?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
David



Joined: 08 Aug 2004
Posts: 25
Location: Lubbock, Texas

PostPosted: Sat Dec 15, 2007 12:30 am    Post subject: Not another autoclicker?!? Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group