Sign in to follow this  
Followers 0
omraanw

simple script

3 posts in this topic

hello, im new to these forums was in deer need of a simple script. Everytime i press left mouse the script should press r and there should be a delay aswell. I'm very nooby when it comes to programming. thanks in advance

Share this post


Link to post
Share on other sites



You need to take a look to AutoIT help file:
_IsPressed()
Send()

Regards
Alien.

Share this post


Link to post
Share on other sites

Like this:
 

#include <Misc.au3>
#include <MsgBoxConstants.au3>

Local $hDLL = DllOpen("user32.dll")

While 1
    If _IsPressed("01", $hDLL) Then
        ConsoleWrite("_IsPressed - Left Mouse Key was pressed." & @CRLF)
        ; Wait until key is released.
        While _IsPressed("01", $hDLL)
            Sleep(10)
        WEnd
        Send("r")
    EndIf
    Sleep(10)
WEnd
DllClose($hDLL)

 


Regards,
 

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