Jump to content
Sign in to follow this  
Snhd

Button To Mouse Move

Recommended Posts

Snhd

I need help with how i can make a Button and when i click it the mousemoving and clicking will start...

like this the button "click to start" and when i click it the mouse will move :)

thats what I need help with please help me fast : D

Thanks.

Share this post


Link to post
Share on other sites
Snhd

omg i can't start the thing becuz it says "While" statement has no matching "Wend" statement.:

EndFunc omg.. and i have tryed many things now !! help..

Share this post


Link to post
Share on other sites
somdcomputerguy

Post the code you've got so far.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Snhd

what do i need to do to make a button that stops the mouseclicking that i have started ?

Share this post


Link to post
Share on other sites
Werty

Lift your finger.

..or post the code you have so far.

Share this post


Link to post
Share on other sites
Snhd

Lift your finger.

..or post the code you have so far.

Case $msg = $button_1

MouseClick("left",628,321)

MouseClick("left",628,356)

MouseClick("left",628,402)

MouseClick("left",628,442)

MouseClick("left",628,481)

MouseClick("left",628,521)

MouseClick("left",628,561)

MouseClick("left",628,602)

*I have this right and i need to know how i can stop it*

Share this post


Link to post
Share on other sites
Xandy

#include <misc.au3>
$done= 0
$clicking= 0
while $done= 0
    if _IsPressed("1b") then $done= 1;ESC to end script
    if _IsPressed("0d") Then;ENTER toggle clicking
        while _IsPressed("0d");while toggle button down         
                        sleep(20)
        wend
        if $clicking= 0 Then
            $clicking= 1
        Else
            $clicking= 0
        endif
    endif
    if $clicking= 1 Then;if clicking click mouse
        MouseClick("left")
    endif
wend

the code you listed should stop on it's own just fine

Share this post


Link to post
Share on other sites
Snhd

#include <misc.au3>
$done= 0
$clicking= 0
while $done= 0
    if _IsPressed("1b") then $done= 1;ESC to end script
    if _IsPressed("0d") Then;ENTER toggle clicking
        while _IsPressed("0d");while toggle button down         
                        sleep(20)
        wend
        if $clicking= 0 Then
            $clicking= 1
        Else
            $clicking= 0
        endif
    endif
    if $clicking= 1 Then;if clicking click mouse
        MouseClick("left")
    endif
wend

the code you listed should stop on it's own just fine

ummm so when i click the "ESC" the clicking will stop ?

Share this post


Link to post
Share on other sites
Xandy

ESC will will terminate the script

ENTER will toggle mouseclicking ON/OFF

ON: mouse clicks pretty much as fast as it can, we could add a delay

OFF: no mouse clicks are sent from script

TERMINATED: script is no longer running controling anything

Share this post


Link to post
Share on other sites
Snhd

okey, is it possible to make a mouseclicker that is clicking in a program that you have made and then you just minimize the program down and can do adder stuff while it's still clicking at the program?

:)

Share this post


Link to post
Share on other sites
Xandy

yes, use hotkey triggers to toggle the state of the clicking

goal: script acts on hotkeys and when the script is in click mode clicks the mouse, but runs silently with no window face.

Share this post


Link to post
Share on other sites
Xandy

#include <misc.au3>
$done= 0
$clicking= 0
while $done= 0
    if _IsPressed("1b") then $done= 1;ESC to end script
    if _IsPressed("0d") Then;ENTER toggle clicking
        while _IsPressed("0d");while toggle button down         
                        sleep(20)
        wend
        if $clicking= 0 Then
            $clicking= 1
        Else
            $clicking= 0
        endif
    endif
    if $clicking= 1 Then;if clicking click mouse
        MouseClick("left")
    endif
wend

Is this clicking the mouse too fast?

Do you not like ENTER as the hotkey to toggle clicking mouse?

Is there an error I am overlooking?

Share this post


Link to post
Share on other sites
Snhd

same code and i can't start(Go) it...

Share this post


Link to post
Share on other sites
Xandy

works for me are you sure it's not running?

remember if you press ESC it will kill the script

and remember that when autoit runs with no face by default it's still running is the task tray at the bottom right of Windows OS

try pressing CTRL-BREAK alot too to force everything autoit related to stop

Share this post


Link to post
Share on other sites
Xandy

yah, exit that.

then run my script

then when you press ENTER it will send mouse click

and when you press ENTER again it will stop sending mouse clicks

Edited by songersoft

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.