Sign in to follow this  
Followers 0
G4ORCE

Help with looping?

6 posts in this topic

Hey ive just made a script but i cant seem to find out how i can make it keep doing the script till i stop it ATM i am just pasting the script a numerous amount of times and eventually it will stop. can anyone help me tell the script to do it unlimited amount of times till i stop it??

thx, Chris

MouseClick("Left", 866, 440, 1)
sleep(1000)
MouseClick("Left", 513, 687, 1)
sleep(1000)
MouseClick("Left", 513, 676, 1)
sleep(1000)
MouseClick("Left", 735, 361, 1)
sleep(1000)
MouseClick("Left", 503, 676, 1)
sleep(120015)



Mousemove(869, 403, 10000)
sleep(400)
MouseClick("Left", 870, 319, 1)
sleep(500)
Mousemove(729, 357, 10000)
sleep(400)
MouseClick("Left", 731, 299, 1)
sleep(500)

Share this post


Link to post
Share on other sites



http://www.autoitscript.com/autoit3/docs/intro/lang_loops.htm

Might be some good reading :blink:

Share this post


Link to post
Share on other sites

thx i read that but idunno wat one to choose?

Share this post


Link to post
Share on other sites

Hi,

HotKeySet("{Esc}", "_Exit") ;Esc key to exit

While 1
    MouseClick("Left", 866, 440, 1)
    sleep(1000)
    MouseClick("Left", 513, 687, 1)
    sleep(1000)
    MouseClick("Left", 513, 676, 1)
    sleep(1000)
    MouseClick("Left", 735, 361, 1)
    sleep(1000)
    MouseClick("Left", 503, 676, 1)
    sleep(120015)

    Mousemove(869, 403, 10000)
    sleep(400)
    MouseClick("Left", 870, 319, 1)
    sleep(500)
    Mousemove(729, 357, 10000)
    sleep(400)
    MouseClick("Left", 731, 299, 1)
    sleep(500)
WEnd

Func _Exit()
    Exit
EndFunc

Cheers

Share this post


Link to post
Share on other sites

HotKeySet("{ESC}", "Terminate")

While 1

MouseClick("Left", 866, 440, 1)
sleep(1000)
MouseClick("Left", 513, 687, 1)
sleep(1000)
MouseClick("Left", 513, 676, 1)
sleep(1000)
MouseClick("Left", 735, 361, 1)
sleep(1000)
MouseClick("Left", 503, 676, 1)
sleep(120015)



Mousemove(869, 403, 10000)
sleep(400)
MouseClick("Left", 870, 319, 1)
sleep(500)
Mousemove(729, 357, 10000)
sleep(400)
MouseClick("Left", 731, 299, 1)
sleep(500)

Wend

Func Terminate()
    Exit 0
EndFunc

Hope this helps. Declare the required headers.

Share this post


Link to post
Share on other sites

ohh thank you so much mate ur a legend:D

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