Sign in to follow this  
Followers 0
Foxtrot

hey scripters, i need some help with a repeat fuction

3 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

[center]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.[/center]

Share this post


Link to post
Share on other sites

yes i found the function :P thanks, its working now

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