Sign in to follow this  
Followers 0
OmenSWE

Help me find it.

3 posts in this topic

Im sure this script already exist.. have not found it on the forum..

Holding down left mouse button make it click until you release it

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Im sure this script already exist.. have not found it on the forum..

Holding down left mouse button make it click until you release it

You mean this?

Down:

MouseDown("LEFT")

Release

MouseUp("LEFT")
Edited by Tyranlol

[u]Only by Attempting the Impossible You Can Earn the Remarkable[/u]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I think he means he wants to get the state of the mouse button and if it is down, continuously send a complete down/up click until he physically releases it. Not sure if it is a work around for you or not, but when I have needed to do this. I simply make hotkey go button to start and stop the clicking.

Here is an example I have used before.

HotKeySet("{F1}","Go")
HotKeySet("{ESC}","Terminate")
Global $click = False

While True
    Sleep(10)
    If $click = True Then MouseClick("left")
WEnd

Func Go()
    $click = Not $click
EndFunc

Func Terminate()
    Exit
EndFunc

Oh btw, the way to tell if the mouse is pressed is would be to do this...

#include <Misc.au3>
$dll = DllOpen("user32.dll")
While True
    sleep(10)
    If _IsPressed("01", $dll) Then MouseClick("left")
WEnd

but the MouseClick command fools _IsPressed into thinking you have released the button since it completes the click by releasing it. Therefore this bit of code doesn't work and will only click once.

Edited by ShawnW

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