Jump to content

Have 2 windows opened at once


Recommended Posts

can i have 2 windows open at the same time if i press a button on a page before. Like your on one page and you press next and it deletes the window with the next button on it with GUIDelete() and then open 2 gui's at the same time?

heres what i thougth would work but it just opens one not both:

#include <GUIConstants.au3>

GUICreate("My GUI  main",300,300, 100,200)
$button = GUICtrlCreateButton (10,40,200,20)
GUISetState ()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $button
            fun1()
            fun2()
    EndSelect
WEnd

Func fun1()
    GUICreate("My GUI fun1",220,100, 100,200)
    GUISetState ()
    
    While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd
EndFunc

Func fun2()
    GUICreate("My GUI fun2",220,100, 100,200)
    GUISetState ()
    
    While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd
EndFunc

can i have a random of other things then numbers? like guicreate's, msgboxs, pics

Edited by hellogoodbye
Link to comment
Share on other sites

  • Moderators

You never leave the func1() until you kill func1()'s GUI, you're stuck in that functions loop, with no command to do anything but loop around or exit that gui (which by the way, doesn't delete it when it exits it).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...