Sign in to follow this  
Followers 0
3dude

If button pressed

5 posts in this topic

If $button = WHAT then open_gui()

What do I put in WHAT! I forgot what it was so please tell me!

Thanks!

If I am wrong please correct me!

I want to press a button and a window to pop up!

Thanks again :)


View my blog :) 3dude's blog <= help with project :S

Share this post


Link to post
Share on other sites



here's a full examlpe about making GUI and Buttons

#include <GUIConstants.au3>

$main_GUI = GUICreate ("Main GUI", 200 , 100,-1,-1,$WS_POPUPWINDOW + $WS_THICKFRAME)
$b_1 = GUICtrlCreateButton("Show Child GUI", 10, 20,120, 30)
$x = GUICtrlCreateButton("Exit", 10, 60,120, 30)
GUISetState(@SW_SHOW, $main_GUI)
$a = WinGetPos ($main_GUI)
$child_GUI = GUICreate("Child GUI",200,100,$a[0] + 210 , $a[1],$WS_POPUPWINDOW + $WS_THICKFRAME)
GUICtrlCreateLabel("This is the Child GUI", 50, 30,120, 30)
$b_2 = GUICtrlCreateButton("Close Child GUI", 40, 60,120, 30)
GUISetState(@SW_HIDE, $child_GUI)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $x
            Exit
        Case $msg = $b_1
            GUISetState (@SW_SHOW, $child_GUI)
            GUICtrlSetState ($b_1 , $gui_disable)
        Case $msg = $b_2
            GUISetState (@SW_HIDE, $child_GUI)
            GUICtrlSetState ($b_1 , $gui_enable)
    EndSelect
WEnd

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites

Ahhh That's fantastic!! Thanks a lot! It contains answers to many of my questions!

Thanks a lot


View my blog :) 3dude's blog <= help with project :S

Share this post


Link to post
Share on other sites

Ahhh That's fantastic!! Thanks a lot! It contains answers to many of my questions!

Thanks a lot

you're welcome but I recommend u to search the forum u'll see alot of amazing members examples


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites

Sorry it was I was in a rush! It won't happen again!

:)


View my blog :) 3dude's blog <= help with project :S

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