Sign in to follow this  
Followers 0
hellogoodbye

Have 2 windows opened at once

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



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


[center]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.[/center]

Share this post


Link to post
Share on other sites

woot! i got it thanks smoke n!!

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