Jump to content
Sign in to follow this  

Restarting a While Loop (problem solved)

Recommended Posts

Anyone know how to do this? Or perhaps there is another solution. Here's my code..I'll try and downsize it a bit.

While 1;main loop
    if 1 Then;condition removed for reproducer
        $DOS = InputBox("Enter data","Enter data::",""," ",-1,120);take in input
        if @error=1 Then; @error=1 means the cancel button was pressed
            MsgBox(48,"Action cancelled","Exiting program")
            ExitLoop;######I would prefer the program go back to the beginning of the loop here instead###
    ;below code commented out for reproducer
    ;Function called here
    ;Select;some functions and whatnot
    ;Case GUICtrlRead($rad1) = $GUI_CHECKED
    ;Case GUICtrlRead($rad2) = $GUI_CHECKED
    ;Case GUICtrlRead($rad3) = $GUI_CHECKED

You can run that if you'd like. You see it just keeps running in a loop until canceled. Instead, when testing for @error, I want it to go back to the beginning of the While loop.

Edited by Nevin

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...