Jump to content

Recommended Posts

Posted

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?

auto_torrent___version_1.3.au3

Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...