Jump to content

Help me find it.


Recommended Posts

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]
Link to comment
Share on other sites

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