Jump to content

GUI help


uzi17
 Share

Recommended Posts

Replaced testProgram() function for the one below. When you call testProgram() function inside the While statement after pressing yes or no you didn't tell the script to ExitLoop so you delete the GUI, but the script was stock in the while loop.

Func testProgram()
    
$Form1 = GUICreate("Test", 463, 137, 192, 154)
GUICtrlCreateLabel("This will open and close the program you entered to test whether the information you entered was valid, Do you wish to continue?", 16, 24, 436, 49)
$yes = GUICtrlCreateButton("Yes", 160, 96, 75, 25, 0)
$no = GUICtrlCreateButton("No", 240, 96, 75, 25, 0)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $yes
        GUIDelete()
        testStart()
        ExitLoop
    Case $msg = $no Or $msg = $GUI_EVENT_CLOSE
        GUIDelete()
        ExitLoop
    EndSelect
WEnd
EndFunc
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
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...