Jump to content

Turbo function for Mouse click


Recommended Posts

Not a good start.

i am sorry if i did something wrong. what would be a good start?

Answer: Yes.

could you please help me create and use such script?

my programming expirience is pretty low. basic stuff. i think i generaly know how the script should look like but this is the first time i am using autoit so specific command lines are mistery to me.

Edited by TwistedMind
Link to comment
Share on other sites

i already tried seardhing the forum for solution, but without luck.

online documentation is helpful but it won't teach me how to use entire program. i have had a look at it and i do know more than before but it would take me weeks to accomplish what i want.

Link to comment
Share on other sites

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    If _IsPressed("11", $dll) Then
        Do
            mouseclick("left")
            sleep(100)
        until _IsPressed("12", $dll)
    EndIf
WEnd
DllClose($dll)

Ctrl will start it and alt will stop it.

Link to comment
Share on other sites

that is close to what i need but not exactly that.

i need turbo only while i am holding the button.

but i could live with something like:

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    If _IsPressed("4", $dll) Then
        Do
            mouseclick("middle")
            sleep(100)
        until _IsPressed("4", $dll)
    EndIf
WEnd
DllClose($dll)

i know this won't work, it is only example

Link to comment
Share on other sites

I am sorry for double posting

So i finaly did it. I finished the script succesfuly.

This script will add a turbo function to any button:

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    While _IsPressed("button", $dll)
        Do
            Send ("{button}")
            sleep(100)
        until Not _IsPressed("button", $dll)
    WEnd
WEnd
DllClose($dll)

or to send a mouse click

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    While _IsPressed("button", $dll)
        Do
            mouseclick("click")
            sleep(100)
        until Not _IsPressed("button", $dll)
    WEnd
WEnd
DllClose($dll)

Unfortunatly the second version, where you send mosueclick, won't work in game. But since you can asign any game command to any key it is posible to do it with a waste of one key.

thank you every one who participated in this topic. AND SPECIAL THANKS TO Pantera975

Edited by TwistedMind
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...