Jump to content
Sign in to follow this  
TwistedMind

Turbo function for Mouse click

Recommended Posts

TwistedMind

Is it even posible to make such a script which will work in game?

thanks

Share this post


Link to post
Share on other sites
Yashied
TwistedMind

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

Share this post


Link to post
Share on other sites
Yashied
TwistedMind

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.

Share this post


Link to post
Share on other sites
Pantera975

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

Share this post


Link to post
Share on other sites
TwistedMind

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

Share this post


Link to post
Share on other sites
qazwsx

So you want to do something WHILE something ISPRESSED.

Share this post


Link to post
Share on other sites
TwistedMind

yes. basicly this

while mouse3 is pressed
 loop
  mouse3
  sleep 100

i tried changing pantera's script but no luck.

Share this post


Link to post
Share on other sites
TwistedMind

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.