Jump to content
Sign in to follow this  
ITSky8

How to allow this loop again and again

Recommended Posts

ITSky8

How to allow this loop again and again

For $i=1 to n

MouseClick(left,30,30)

Sleep(2000)

Next

How to replace the n?

Share this post


Link to post
Share on other sites
ITSky8

How to allow this loop again and again

For $i=1 to n

MouseClick(left,30,30)

Sleep(2000)

Next

How to replace the n?

Thx.

$i=1

While $i>0

MouseClick(left,30,30)

Sleep(2000)

$i=$i+1

WEnd

Share this post


Link to post
Share on other sites
star2

Just like the master told you use While-Wend

example:

HotKeySet ("{F1}", "_exit") ; this is a hotkey to help you execute a function

While 1 ; this will make your script loops
    MsgBox (-1, "test" , "test", 1)
WEnd

Func _exit() ; simple function to exit the script
    Exit
EndFunc
Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

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  

×