Sign in to follow this  
Followers 0
Joshuaaaa

MouseClick speed and number under mouse hover?

12 posts in this topic

Is there a code to click right mouse repetedly wherever the cursor goes?

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

Is there a code to click right mouse repetedly wherever the cursor goes?

#include <Misc.au3>
Do
MouseClick ("SECONDARY")
Until _IsPressed ("1B")
Edited by Bert

Share this post


Link to post
Share on other sites

#include <Misc.au3>
Do
MouseClick ("SECONDARY")
Until _IsPressed ("1B")
It gives me an error.

Share this post


Link to post
Share on other sites

Check again. It has to work. Press the ESC key to stop it.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Check again. It has to work. Press the ESC key to stop it.

Don't mind the mess ----> Line 29 is giving me an unknown function error ([until _IsPressed ("1B")).

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Tester = GUICreate("Simple Clicker", 201, 151, 337, 222)
GUISetCursor (2)
GUISetBkColor(0xA6CAF0)
$Auto_Scatter = GUICtrlCreateCheckbox("Auto_Scatter", 56, 24, 97, 17)
GUICtrlSetBkColor(-1, 0xC0DCC0)
$Auto_Jumper = GUICtrlCreateCheckbox("Auto_Jumper", 56, 56, 97, 17)
GUICtrlSetBkColor(-1, 0xC0DCC0)
$Run = GUICtrlCreateButton("Run", 59, 115, 75, 25, 0)

GUICtrlSetFont(-1, 8, 400, 0, "Comic Sans MS")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Run
            If BitAND(GUICtrlRead($Auto_Scatter), $GUI_CHECKED) Then
             ; #include <Misc.au3>
Do
MouseClick ("SECONDARY")
[Until _IsPressed ("1B")
                MsgBox(0, "Info","Auto_Scatter selected - will execute corresponding code")
            EndIf
            If BitAND(GUICtrlRead($Auto_Jumper), $GUI_CHECKED) Then
             ;Send("{SPACE Down}")
Sleep(3000); 3 seconds
Send("{SPACE Up}")
                MsgBox(0, "Info","Auto_Jumper selected - will execute corresponding code")
            EndIf
    EndSwitch
WEnd
Edited by Joshuaaaa

Share this post


Link to post
Share on other sites

Its just a matter if you check the help file...09=Tab

Share this post


Link to post
Share on other sites

Can I also set a stop code if something is NOT a "Do" function?

For example:

If BitAND(GUICtrlRead($Auto_Jumper), $GUI_CHECKED) Then
                Send("{LCTRL Down}")
Sleep(3000); 3 seconds
Send("{LCTRL Up}")

I know it won't work if I do Until _IsPressed ("7A"), so there's an alternate?

PS: last question and my script is done :)

Share this post


Link to post
Share on other sites

Use AdlibEnable

Share this post


Link to post
Share on other sites

1) The mouse botton clicks repeatedly, but is there a way to set a space between each click?

and ( for generator)

2) I've mingled and tried so many things with AdibEnable, and I cannot touch-down on how to get it to stop this script:

If BitAND(GUICtrlRead($Auto_Jumper), $GUI_CHECKED) Then
                
                Send("{LCTRL Down}")
Sleep(3000); 3 seconds
Send("{LCTRL Up}")

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

space as in time or a spacebar send? if time sleep () if spacebar send ("{space}") or something like that.

Edited by sccrstvn93

Share this post


Link to post
Share on other sites

AdLibEnable Example:

GLOBAL $count = 0

$time = InputBox ("Time", "Enter a time (in MS)")

AdlibEnable ("BackgroundFunc", $time)

While 1
    ToolTip ("The AdLib loop has run " &$count&" times.", 0, 0)
WEnd

Func BackgroundFunc ()
    $count += 1
EndFunc

Rough but also shows how a time can change... :)

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