Sign in to follow this  
Followers 0
agertnas

Automatic mouse clicking?

4 posts in this topic

I want to make a simple program that allows me to press a button on the mouse, hold it down, and it will press multiple times.

The purpose of this is to save life on my mouse when I play some click fest games. I understand that this wont work on some games, But i'd like to make it anyway.

Can I get any suggestion on how to do the mouse portion of this? Giving me some stuff to look up on the help section would be fine as well..

I guess its possible that there is no way to do this as well, but I can't imagine that being true. If it is impossible, let me know..

Share this post


Link to post
Share on other sites



I want to make a simple program that allows me to press a button on the mouse, hold it down, and it will press multiple times.

The purpose of this is to save life on my mouse when I play some click fest games. I understand that this wont work on some games, But i'd like to make it anyway.

Can I get any suggestion on how to do the mouse portion of this? Giving me some stuff to look up on the help section would be fine as well..

I guess its possible that there is no way to do this as well, but I can't imagine that being true. If it is impossible, let me know..

Loop 1 (While)

Loop 2(While) + _IsPressed

MouseGetPos

MouseClick

Loop 2 End (WEnd)

Sleep 50

Loop 1 End (WEnd


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Loop 1 (While)

Loop 2(While) + _IsPressed

MouseGetPos

MouseClick

Loop 2 End (WEnd)

Sleep 50

Loop 1 End (WEnd

Thank you I have got it figured out..

The code I have right now is below.. What can I do to make this so while the right button on the mouse is down it will continue the click process? I figured this would do it, but apparently I am missing something..

While 1 
    While _Ispressed(02)

$x = MouseGetPos(0)
$y = MouseGetpos(1)
MouseClick("right", $x, $y, 5, 100)

Sleep (200)
    WEnd

WEnd

Also i'd like to make it stop the click process when the button is released. I tried to use mousedown for that, but it just ended up creating an endless loop.

Edited by agertnas

Share this post


Link to post
Share on other sites

lmao

While 1
    While _Ispressed(02)

$x = MouseGetPos(0)
$y = MouseGetpos(1)
MouseDown("Right")

Sleep (200)
    WEnd

WEnd

I always make things harder than they should be :-/

Thank you for the help Smoke!

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  
Followers 0