Jump to content

simple script


Recommended Posts

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

Link to comment
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,
 

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