Sign in to follow this  
Followers 0
Warning

Clicker

3 posts in this topic

Hello, I tried to do a universal AutoClicker but I can finish It

Current Source:

#include <Misc.au3>

Local $hDll = DllOpen("user32.dll"), $iPaused = False
HotKeySet("{ESC}", "_Terminate")

While 1
    Sleep(10)
    If $iPaused <> True And _IsPressed("01", $hDll) Then
        $pos = MouseGetPos()
        MouseClick("left", $pos[0], $pos[1])
        Sleep(50)
    EndIf
WEnd

Func _Terminate()
    Exit 0
EndFunc

But it isn't working. I think it's cuz this line:

$pos = MouseGetPos()
        MouseClick("left", $pos[0], $pos[1])
        Sleep(50)

It presses once when i press the Lmouse. But I need a continously loop until I hold my hand on the Lmouse. I tried While 1 / WEnd but then the Loop will be infinite. Any idea?

Share this post


Link to post
Share on other sites



Hello, I tried to do a universal AutoClicker but I can finish It

Current Source:

#include <Misc.au3>

Local $hDll = DllOpen("user32.dll"), $iPaused = False
HotKeySet("{ESC}", "_Terminate")

While 1
    Sleep(10)
    If $iPaused <> True And _IsPressed("01", $hDll) Then
        $pos = MouseGetPos()
        MouseClick("left", $pos[0], $pos[1])
        Sleep(50)
    EndIf
WEnd

Func _Terminate()
    Exit 0
EndFunc

But it isn't working. I think it's cuz this line:

$pos = MouseGetPos()
        MouseClick("left", $pos[0], $pos[1])
        Sleep(50)

It presses once when i press the Lmouse. But I need a continously loop until I hold my hand on the Lmouse. I tried While 1 / WEnd but then the Loop will be infinite. Any idea?

If you use While 1 like you did, the loop will be infinite, but you will be able to terminate the script by pressing ESC.

About the script, you don't need to get the mouse position if you are going to click where the mouse is poiting to.

All you have to do is use the MouseClick function with only the first parameter.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

this can be one

#include <Misc.au3>

While 1
    If _IsPressed("01", "user32.dll") Then
        MouseClick("left",100,200,100,10); Set your click coordinates here, check helpfile to set the desired click
    Else
        Sleep ( 10 )
    EndIf
WEnd

Not exactly what you need, but i can't find a way to register the event of "Mouse hold down" with _IsPressed or with any other method.

try to take a look at this post:

geosoft might have done it.

And also this one for other infos:

Always use search function.

Edited by Newb

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

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