Jump to content

Help with looping?


Recommended Posts

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)
Link to comment
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

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...