Sign in to follow this  
Followers 0
3dude

Parent and Child help

11 posts in this topic

Could someone explain because I couldn't find anything useful in the help file!

I created a GUI and when you press a button a calendar appears but when I close the calendar the whole program closes!

Thanks


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

Share this post


Link to post
Share on other sites



Could someone explain because I couldn't find anything useful in the help file!

I created a GUI and when you press a button a calendar appears but when I close the calendar the whole program closes!

Thanks

Can you post the script?

It could be that you need to use

$msg = GuiGetMsg(1);advanced mode so you can tell which window gave the message
switch $msg[0]
 case $GUI_EVENT_CLOSE
        if $msg[1] = $guiChild then GuiDelete($guichild)
        if $msg[1] = $guiparent then exit
endswitch

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Off topic, but could you (3dude) modify that image in your signature to be at least half the width. You might have a wide resolution, but not everyone does.

Share this post


Link to post
Share on other sites

to martin:

Thanks I will post some of my script later!

to Saunders:

Sorry I noticed! I started cutting it in Photoshop but I had to go out!

I will remove it!


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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

How should I change it martin?

While 1
    $gm = GUIGetMsg()
    Switch $gm
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $cal
            MsgBox(0, 'Calendar', GUICtrlRead($cal))
    EndSwitch
WEnd
EndFunc
Edited by 3dude

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

Share this post


Link to post
Share on other sites

Hmm nobody seems to know!


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

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

#include <guiconstants.au3>

$the_GUI = GUICreate ("Test" , 200 , 80,-1,-1,$WS_CAPTION)
$button = GUICtrlCreateButton ("Show Calander" , 20 , 10 , 100, 25)
$exit = GUICtrlCreateButton ("Exit" , 20 , 45 , 100, 25)
GUISetState (@SW_SHOW, $the_GUI)

$date = GUICreate ( "My GUI get date", 200,80,-1,-1,$WS_CAPTION)
$back = GUICtrlCreateButton ("Back" , 20 , 45 , 100, 25)
GUICtrlCreateDate ("1953/04/25", 10,10,185,20 )
GUISetState (@SW_HIDE, $date)
While 1
    $msg = GUIGetMsg ()
    Select
    ; ==== buttons events  ======
        Case $msg = $exit
            Exit
        Case $msg = $button
            GUISetState (@SW_HIDE, $the_GUI)
            GUISetState (@SW_SHOW, $date)
        Case $msg = $back
            GUISetState (@SW_SHOW, $the_GUI)
            GUISetState (@SW_HIDE, $date)
    EndSelect
WEnd

is this what u need?

Edited by star2

[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

Yes something like that! I will try to customize it and tell you!

But thanks!


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

Share this post


Link to post
Share on other sites

Thanks!

(Nice avatar)

:)


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

Share this post


Link to post
Share on other sites

No problem glad I could help...

Yeah I picked a good advatar


[center][/center]

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