Sign in to follow this  
Followers 0
shade123

urgent help needed

6 posts in this topic

okay, i want it so that when someone right clicks, it holds down the right click button until they press it again. whilst it is held down i want it to spam the f11 key 20 times then f12 key once then loop that until the right click hold is terminated. here is what i got so far but it wont work, says error with line 3 (the if {Rbutton} = pressed line):

$clicked = 0

If {RButton} = pressed Then

If $clicked = 1 Then

$clicked = 0

MouseUp("right")

Else

$clicked = 1

MouseDown("right")

Send("{F11 20}")

Send("{F12}")

EndIf

Else

Sleep(100)

EndIf

Share this post


Link to post
Share on other sites



#Include <Misc.au3>

$clicked = 0

While 1

If _IsPressed("{RButton}") Then

If $clicked = 1 Then

$clicked = 0

MouseUp("right")

Else

$clicked = 1

MouseDown("right")

Send("{F11 20}")

Send("{F12}")

EndIf

Else

Sleep(100)

EndIf

WEnd

that doesnt work, so what now?

Share this post


Link to post
Share on other sites

_IsPress expecting to receive string representing a number. Read the help file again. "02" is for right mouse button.

Share this post


Link to post
Share on other sites

too complicated.. tested this myself, i'll let you fill in the rest

$x = MouseClick("right")
If _IsPressed($x) = True Then
MouseUp("right")
Sleep(10)
MouseDown("right")

Share this post


Link to post
Share on other sites

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