Jump to content
Sign in to follow this  
omraanw

simple script

Recommended Posts

omraanw

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
alien4u

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

Regards
Alien.

Share this post


Link to post
Share on other sites
VIP

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  

×

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.