Sign in to follow this  
Followers 0
NoblePhantasm

How to add a loop and a loop stopper to this?

4 posts in this topic

MouseClick ( "left" , 658,123, 2)
sleep (1500)
MouseClick ( "left" , 654,437)

Share this post


Link to post
Share on other sites



I don't really understand what kind if loop you want, but hopefully I can help a little.

I would do something like this

Local $1 = 1
While $1 = 1
MouseClick ( "left" , 658,123, 2)
sleep (1500)
MouseClick ( "left" , 654,437)
;and here to tie it to something when you want to stop it, like If something then $i = $i + 1 so it would "break away" from  the while loop
EndIf

Hope this helps

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

@SorryButI'maNewbie - You should have included the ExitLoop command in that example, but I would first like to hear more from the OP, about what this clicking is for, as we need to determine what would be the possible signal for exiting the loop. A counter on its own would not be enough, unless it is purely time/click number based.

Before we offer anymore, let's wait for an expanded description from OP.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Im trying to add an infinite click loops then having a hotkey to stop it from moving/stop.

Edit* i got it

HotKeySet("{ESC}", "Terminate")
While 1
MouseClick ( "left" , 658,123, 2)
sleep (1500)
MouseClick ( "left" , 654,437)
WEnd

Func Terminate()
    Exit
EndFunc
Edited by NoblePhantasm

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