Jump to content

hey scripters, i need some help with a repeat fuction


Recommended Posts

im new to autoit as you will see in a second, i've made a simple code but i don't know the excact way to repeat something, anyways im putting up the code, then you might be so kind as to tell me what to do :P

MsgBox ( 1, "Okay!", "Start" )
Mouseclick( "left" , 628, 412 )
Sleep ( 1000 )
Send (" {PGDN} ")
Sleep ( 1000 )
Mouseclick( "left" , 601, 629 )
Mouseclick( "left" , 601, 655 )
Mouseclick( "left" , 692, 630 , 2 )
Sleep ( 1000 )
Send (" {bs} ")
Send (" {4} ")
Mouseclick( "left" , 634, 691 )
Sleep ( 1000 )
Send (" {PGDN} ")
Sleep ( 1000 )
Mouseclick( "left" , 630, 715 )
Sleep ( 3000 )
Send ( "!d" )
Send ( "" , 1 )
Sleep ( 1000 )
Send ( "{ENTER}" )
Sleep ( 10000 )
Send ( "!d" )
Send ( "" , 1 )
Sleep ( 3000 )
Send ( "{ENTER}" )
Sleep ( 1000 )
send ( "{PGDN}" )
Mouseclick( "left" , 627, 668 )
Send ( "{2}")
Sleep ( 200 )
Send ( "{enter}" )
Mouseclick( "left" , 692, 720 )
--------------------------------- from here i want it to repeat itself
Send ( "!d" )
Send ( "" , 1 )
Mouseclick( "left" , 628, 412 )
Sleep ( 1000 )
Send (" {PGDN} ")
Sleep ( 1000 )
Mouseclick( "left" , 601, 629 )
Mouseclick( "left" , 601, 655 )
Mouseclick( "left" , 692, 630 , 2 )
Sleep ( 1000 )
Send (" {bs} ")
Send (" {4} ")
Mouseclick( "left" , 634, 691 )
Sleep ( 1000 )
Send (" {PGDN} ")
Sleep ( 1000 )
Mouseclick( "left" , 630, 715 )
Sleep ( 3000 )
Send ( "!d" )
Send ( "" , 1 )
Sleep ( 1000 )
Send ( "{ENTER}" )
Sleep ( 10000 )
Send ( "!d" )
Send ( "" , 1 )
Sleep ( 3000 )
Send ( "{ENTER}" )
Sleep ( 1000 )
send ( "{PGDN}" )
Mouseclick( "left" , 627, 668 )
Send ( "{2}")
Sleep ( 200 )
Send ( "{enter}" )
Sleep ( 1000 )
send ( "{PGDN}" )
Mouseclick( "left" , 627, 668 )
Send ( "{2}")
Sleep ( 200 )
Send ( "{enter}" )
Sleep ( 1000 )
send ( "{PGDN}" )
Mouseclick( "left" , 627, 668 )
Send ( "{2}")
Sleep ( 200 )
Send ( "{enter}" )
Sleep ( 1000 )
send ( "{PGDN}" )
Mouseclick( "left" , 627, 668 )
Send ( "{2}")
Sleep ( 200 )
Send ( "{enter}" )
Mouseclick( "left" , 692, 720 )
-------------------------------------- to here. Should be quite simple, but i don't know how to.

Thanks in advance :D

Link to comment
Share on other sites

  • Moderators

Look in the help file under Loop(s).

While/Wend

For/Next

Do/Until

Edit:

Also AdlibEnable() may be what you want, but you'll still need one of the loops above to keep your script running and not exit.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...