Jump to content
Sign in to follow this  

How can i assing a Mouse Click

Recommended Posts


It is posible to assing Mouse Click using this function ?

HotKeySet("", "")

I mean when i do right/left click a function to start :)

Share this post

Link to post
Share on other sites

While 1
    If _IsPressed(0x1) Then
        MsgBox(0,'', 'You pressed the left button!')

Func OnAutoItstart()
   Global $DllUser32 = DllOpen('user32')

Func OnAutoItExit()

Func _IsPressed($hexKey)
  ; $hexKey must be the value of one of the keys.
  ; _IsPressed will return 0 if the key is not pressed, 1 if it is.
   Local $aR
   $aR = DllCall($DllUser32, "int", "GetAsyncKeyState", "int", $hexKey)
   If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then
      Return 1
      Return 0
EndFunc  ;==>_IsPressed

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.