Jump to content

Auto Clicker


Recommended Posts

Hey.

I'm not very experienced with AutoIt, but I've made some things all by myself, so I thought something that would make the mouse click repeatedly would be easy.

I was wrong.

I tried...

Send("{MouseClick}"), but it didn't work.

Any help?

Link to comment
Share on other sites

Hey.

I'm not very experienced with AutoIt, but I've made some things all by myself, so I thought something that would make the mouse click repeatedly would be easy.

I was wrong.

I tried...

Send("{MouseClick}"), but it didn't work.

Any help?

The only thing that I can say that wouldn't sound sarcastic: MouseClick
Auto3Lib: A library of over 1200 functions for AutoIt
Link to comment
Share on other sites

HotKeySet('{Esc}', '_Exit') 
Sleep(3000) ;Give the user time to position the mouse
While 1 
    MouseClick('left') 
    Sleep(1000) ;click every second 
Wend

Func _Exit() 
    Exit 
EndFunc
Search MouseClick in the helpfile for more info..

Edited by Piano_Man
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

That doesn't matter! Ummm, well maybe it does. I'll change that to include a exit hotkey, and to include a sleep...

It just made me smile - hence the :-)

I could just see the OP testing that code.

I've written code that I cannot get out of so often that I have a Kill AutoIt script that I start via an OS shortcut key. :-(

-MSP-

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

I've written code that I cannot get out of so often that I have a Kill AutoIt script that I start via an OS shortcut key. :-(

lol. That has happened to me a few times but I had a combination of MouseClick and Send and it was meant to open a window and type in it, instead it couldn't open the window and started mouseclicking and sending to my source code then the final send key was Send("^s"). I think you get the picture :)

Davo

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!!

Link to comment
Share on other sites

Made this for myself while ago:

#NoTrayIcon
HotKeySet("{F11}","AutoClicker")
HotKeySet("{NUMPADADD}","SleepMinus")
HotKeySet("{NUMPADSUB}","SleepPlus")
Global $ACBoolean=False, $Sleep=500
While 1
Sleep(1000)
WEnd
Func AutoClicker()
    $ACBoolean=Not $ACBoolean
    While $ACBoolean=True
        MouseClick("left")
        Sleep($Sleep)
    WEnd
EndFunc
Func SleepPlus()
    $Sleep=$Sleep+50
    If $Sleep>=1000 Then
        $Sleep=1000
    EndIf
EndFunc
Func SleepMinus()
    $Sleep=$Sleep-50
    If $Sleep<=10 Then
        $Sleep=10
    EndIf
EndFunc
Link to comment
Share on other sites

Made this for myself while ago:

#NoTrayIcon
HotKeySet("{F11}","AutoClicker")
HotKeySet("{NUMPADADD}","SleepMinus")
HotKeySet("{NUMPADSUB}","SleepPlus")
Global $ACBoolean=False, $Sleep=500
While 1
Sleep(1000)
WEnd
Func AutoClicker()
    $ACBoolean=Not $ACBoolean
    While $ACBoolean=True
        MouseClick("left")
        Sleep($Sleep)
    WEnd
EndFunc
Func SleepPlus()
    $Sleep=$Sleep+50
    If $Sleep>=1000 Then
        $Sleep=1000
    EndIf
EndFunc
Func SleepMinus()
    $Sleep=$Sleep-50
    If $Sleep<=10 Then
        $Sleep=10
    EndIf
EndFunc
Just a small question... why do you limit the sleep to one second?
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Well you can adjust it yourself, because sometimes i want to refresh web page and 1 sec per click is a good rate. It will be hard to adjust after if you set the limit to too big which you don't know how many sec between per click.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...