Jump to content

While Looping question:


Wabbit
 Share

Recommended Posts

Ok, I hope I'm not being a pain here. I have an idea of the basics and I am trying different things that I see on the website. Right now I am testing how to do multiple things within a loop:

$i = 0
While $i <= 10

    MsgBox(0, "My second script!", "Hello #1")
    TestFunc()

    Func TestFunc()
        MsgBox(1, "My Second Script!", "Hello #2")
    EndFunc
    TestFunc2()

    Func TestFunc2()
        MsgBox(2, "My Second Script!", "Hello #3")
    EndFunc
    TestFunc3()

    Func TestFunc3()
        MsgBox(3, "My Second Script!", "Hello #4")
    EndFunc

$i = $i + 1

WEnd

It looks like it will only do one funciton in a while loop. Is this correct? What am I doing wrong?

Many thanks again!

Link to comment
Share on other sites

$i = 0
While $i <= 10
    MsgBox(0, "My second script!", "Hello #1")
    TestFunc ()
    TestFunc2()
    TestFunc3 ()
    $i = $i + 1
WEnd
Func TestFunc ()
    MsgBox(0, "My Second Script!", "Hello #2")
EndFunc   ;==>TestFunc
Func TestFunc2()
    MsgBox(0, "My Second Script!", "Hello #3")
EndFunc   ;==>TestFunc2
Func TestFunc3 ()
    MsgBox(0, "My Second Script!", "Hello #4")
EndFunc   ;==>TestFunc3


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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