Jump to content

Question with a while


Recommended Posts

I have a script with 3 whiles (while 1, while 2 & while 3)

While 2 and 3 are in while 1.

while 1

while 2

If clipget = 0 then exitloop

If clipget = 1 then....... here i need go to the while 1 again

wend

while 3

Wend

wend

Thanks champs... :P

Edited by MarcoCastro
Link to comment
Share on other sites

I got a script with 3 whiles (while 1, while 2 & while 3)

While 2 and 3 are in while 1.

while 1

while 2

If clipget = 0 then exitloop

If clipget = 1 then....... here i need go to the while 1 again

wend

while 3

Wend

wend

Thanks champs...

Look closer at the Exitloop command in the help file. you can specify which level you want to exit into.

Mike

Link to comment
Share on other sites

quick example:

While 1
    $skipflag = 0
    MsgBox(0, "Test", "Loop 1")
    While 2
        If MsgBox(4, "test", "Loop 2" & @CRLF & "skip while 3?") = 6 Then
            $skipflag = 3
            ExitLoop
        Else
            ExitLoop
        EndIf
    WEnd
    While 3 And $skipflag <> 3
        MsgBox(0, "test", "Loop 3")
        ExitLoop
    WEnd
WEnd
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...