Jump to content
Sign in to follow this  
Tomohashi

Auto Clicker

Recommended Posts

Tomohashi

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?

Share this post


Link to post
Share on other sites
PaulIA

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

Share this post


Link to post
Share on other sites
Achilles

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]

Share this post


Link to post
Share on other sites
herewasplato

Sleep(3000);Give the user time to position the mouse where they want it to click repeatedly
While 1 
    MouseClick("left") 
Wend
Search MouseClick in the helpfile for more info..
...and how would you stop this script? :-)

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

Share this post


Link to post
Share on other sites
Achilles

...and how would you stop this script? :-)

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

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites
herewasplato

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]

Share this post


Link to post
Share on other sites
Davo

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!!!

Share this post


Link to post
Share on other sites
Generator

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

Share this post


Link to post
Share on other sites
Achilles

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]

Share this post


Link to post
Share on other sites
Generator

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.

Share this post


Link to post
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
Sign in to follow this  

×