Jump to content

[Help] Event On Right Mouse Click Down?


Hatrick
 Share

Recommended Posts

Ok this is my sad attempt for a simple right mouse click down event: It should click left mouse button over and over every 100milliseconds, but it doesnt.

HotKeySet("{MouseDown ( "Right" )}", "Click")
HotKeySet("{ESC)}", "Terminate")

while 1
    sleep(100)
WEnd

Func Click()
 send("{MouseClick ( "left" )}")
 sleep(100)
EndFunc

Func Terminate()
  Exit 0
EndFune

It gives of an error:

HotKeySet(" {MouseDown( "Right" )}","Click")
 HotKeySet(" {MouseDown( "Right^ERROR

please help

Edited by Hatrick
Link to comment
Share on other sites

ok im lost now.. Could you help please

#include <Misc.au3>

HotKeySet("{ESC)}", "Terminate")

While 1
    If _IsPressed(02) then
    Do
    //What Goes Here to click left mouse button?
        Until Not _IsPressed(02)
    sleep(100)
    EndIf
WEnd

Func Terminate()
  Exit 0
EndFunc
Edited by Hatrick
Link to comment
Share on other sites

#include <Misc.au3>

HotKeySet("{ESC)}", "Terminate")

While 1
    If _IsPressed("02") then
    Do
    Sleep(1)
    Until Not _IsPressed("02")
    MouseClick("left")
    Sleep(100)
    EndIf
WEnd

Func Terminate()
  Exit 0
EndFunc

Link to comment
Share on other sites

thanks mate. If i hold right click down it will keep left click as well, or will it break rightc lick. (if so can i change it to hold R down to left click)

e.g.

#include <Misc.au3>

HotKeySet("{ESC)}", "Terminate")

While 1
    If _IsPressed("52") then
    Do
    Sleep(1)
    Until Not _IsPressed("52")
    MouseClick("left")
    Sleep(100)
    MouseClick("left")
    Sleep(100)
    MouseClick("left")
    Sleep(100)
    MouseClick("left")
    Sleep(100)
    EndIf
WEnd

Func Terminate()
  Exit 0
EndFunc
Edited by Hatrick
Link to comment
Share on other sites

thanks mate. If i hold right click down it will keep left click as well, or will it break rightc lick. (if so can i change it to hold R down to left click)

The above script Executes LeftClicks after you released RightClick. Not sure what you want, but just play around with the code and test it base on your needs. Edited by Generator
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...