Sign in to follow this  
Followers 0

GUI inside GUI

4 posts in this topic

I have a script I've been working on using au3 and I've run into some odd problems that I, so far, can't located answered for.

I will try to give as much example as I can.. Please excuse my amature skills as I just started working with au3.

When I call the select_mark1() function it works but when I Exit it closes both windows. I need to make a new window, display a dropdown list and then return that value to the main function.

edit: Sorry it doesn't line up right :)

Func LaunchPad()
    GUICreate("MD5 Trusted Download Tool " & $ver, 500, 350)

; Loop the GUI
While 1
    $msg = GUIGetMsg()

        Case $msg = $file1_button

        Case $msg = $GUI_EVENT_CLOSE

Func select_file1()
        $file1 = FileOpenDialog("Select Source File", "", "All (*.*)", 1 + 4)
    ;$file1a = StringSplit($file1, "\")
    ;MsgBox(4, "MD5", $file1a[ubound($file1a)-1] & @CRLF & $file1a[1])
        $plH = PluginOpen(@ScriptDir & '\' & "MD5Hash.dll")
            $file1_md5_l = MD5Hash($file1, 1, True)
            GUICtrlSetBkColor($file1_md5, "0x99CCFF")
Func select_mark1()
    Local $msg
    GUICreate("SELECT SOURCE MARKINGS", 200, 100)  

    GUICtrlCreateCombo("item1", 0, 0, 200); create first item
    GUICtrlSetData(-1, "item2|item3", "item3"); add other item snd set a new default

    $mark1_ok = GUICtrlCreateButton("OK", 50, 50, 100, 25)

; Run the GUI until the dialog is closed
    While 1
                                $msg = GUIGetMsg()
        If $msg = $mark1_ok Then
        ; tried Return, Next, Exitloop ????
                               If $msg = $GUI_EVENT_CLOSE Then ExitLoop;(tried Return)

www.abox.orgAvery HowellVisit My AutoIt Website

Share this post

Link to post
Share on other sites

Look at GUISwitch()


Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver: - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post

Link to post
Share on other sites

$GUI_PARENT = guicreate....

$GUI_CHILD = guicreate....


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  
Followers 0