Jump to content
Sign in to follow this  

GUI help

Recommended Posts


Hi, i made a simple program which is attached. everything is working well besides some gui problems

when i click the 'test' button and follow the prompts it works, but when im back to the main gui box i cannot click the 'start' or 'test' button again, i have to close and re-open the program. how can i fix this?


Share this post

Link to post
Share on other sites

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)

While 1
    $msg = GUIGetMsg()
    Case $msg = $yes
    Case $msg = $no Or $msg = $GUI_EVENT_CLOSE

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.