Jump to content



Photo

Repeat / loop command?


  • Please log in to reply
2 replies to this topic

#1 WifiHero

WifiHero

    Seeker

  • Active Members
  • 26 posts

Posted 06 June 2008 - 09:12 AM

Is there a pre-built function for repeating a section of the script?

I have looked through and all I have seen is a prebuilt function for repeating a single line, but not several...







#2 Dampe

Dampe

    Polymath

  • Active Members
  • PipPipPipPip
  • 231 posts

Posted 06 June 2008 - 09:19 AM

Try the autoit help file for
'while'
'for'
'do'

An example to loop a set of lines 10 times

Dim $count = 0 Do        MsgBox (64, "Loop", "This message will appear 10 times!")             ;This is the end of the loop, we have to keep count so the 'do' function knows when to stop!        $count += 1 Until $count = 10

Posted Image

#3 Intosia

Intosia

    Seeker

  • Active Members
  • 29 posts

Posted 06 June 2008 - 09:20 AM

Whats wrong with FOR and WHILE? You can just put 1 line of code in the loop???




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users