Jump to content
Sign in to follow this  
MarcoCastro

Question with a while

Recommended Posts

MarcoCastro

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

Share this post


Link to post
Share on other sites
BigDaddyO

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


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites
DW1

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

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  

×