Jump to content

Automatic mouse clicking?


agertnas
 Share

Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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