raedts Posted August 1, 2006 Share Posted August 1, 2006 Okay i am creating a wizard for mail settings. The problem i encoutered is how to get setting from a combobox into a other child. expandcollapse popup#include <GuiConstants.au3> $provider = "handmatig" Dim $show = 0, $Child_[11], $children = 10 $Main = GuiCreate("Internet Wizzard stap 1", 516, 323, (@DesktopWidth-516)/2, (@DesktopHeight-323)/2) $Button_1 = GuiCtrlCreateButton("&Next >", 335, 290, 80, 25) $Button_2 = GuiCtrlCreateButton("< &Back", 250, 290, 80, 25) $Button_3 = GuiCtrlCreateButton("&Exit", 420, 290, 80, 25) $Button_6 = GuiCtrlCreateButton("", 10, 270, 495, 3, -1, $WS_EX_STATICEDGE) GuiSetState() $Child_[1] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) WinSetTitle ( "Internet Wizzard stap 1", "", "Internet Wizzard stap 2" ) $Label_1 = GuiCtrlCreateLabel("Hartelijk welkom bij de e-mail configuratie wizzard.", 10, 10, 500, 30) $Label_1 = GuiCtrlCreateLabel("Zorg dat u de papieren van uw internet provider bij de hand heeft.", 10, 25, 500, 30) $Label_1 = GuiCtrlCreateLabel("Hierop staan namelijk de benodigde gegevens vermeld.", 10, 40, 500, 30) GuiSetState() $Child_[2] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) WinSetTitle ( "Internet Wizzard stap 2", "", "Internet Wizzard stap 3" ) $Label_1 = GuiCtrlCreateLabel("Kies uw provider uit de onderstaande lijst.", 10, 10, 290, 30) $Label_1 = GuiCtrlCreateLabel("Indien uw provider er niet bij staat kies dan voor geavanceerd", 10, 25, 500, 30) $pro = GUICtrlCreateCombo ("@home", 10,50,100) ; create first item $Child_[3] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_1 = GuiCtrlCreateLabel("Child 3."& $provider, 30, 30, 290, 30) GuiSetState(@SW_HIDE) $Child_[4] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_1 = GuiCtrlCreateLabel("Child 4.", 40, 40, 290, 30) GuiSetState(@SW_HIDE) $Child_[5] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_1 = GuiCtrlCreateLabel("Child 5.", 50, 50, 290, 30) GuiSetState(@SW_HIDE) $Child_[6] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_1 = GuiCtrlCreateLabel("Child 6.", 60, 60, 290, 30) GuiSetState(@SW_HIDE) $Child_[7] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_1 = GuiCtrlCreateLabel("Child 7.", 70, 70, 290, 30) GuiSetState(@SW_HIDE) $Child_[8] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_1 = GuiCtrlCreateLabel("Child 8.", 80, 80, 290, 30) GuiSetState(@SW_HIDE) $Child_[9] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_1 = GuiCtrlCreateLabel("Child 9.", 90, 90, 290, 30) GuiSetState(@SW_HIDE) $Child_[10] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_1 = GuiCtrlCreateLabel("Child 10..... You Must be Nuts if you have ... 10 Children!!!", 50, 100, 390, 30) GUICtrlSetFont(-1, 10, 650) GuiSetState(@SW_HIDE) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_3 ExitLoop Case $msg = $Button_1 Set_Next() Case $msg = $Button_2 Set_Back() ;;; EndSelect WEnd ;--------- Functions ------------------- Func Set_Next() For $x = 1 to $children -1 $Nwin = WinGetState( $child_[$x] ) If $Nwin > 5 Then GuiSetState( @SW_HIDE, $child_[$x]) GuiSetState( @SW_SHOW, $child_[$x +1]) Return EndIf Next EndFunc Func Set_Back() For $x = $children To 1 Step -1 $Nwin = WinGetState( $child_[$x] ) If $Nwin > 5 Then GuiSetState( @SW_HIDE, $child_[$x]) GuiSetState( @SW_SHOW, $child_[$x -1]) Return EndIf Next EndFunc Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 1, 2006 Share Posted August 1, 2006 Hi, did you try to read the select entry of the combo and then just set it the child gui? So long, Mega Don't get the pro totally! Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
eltorro Posted August 1, 2006 Share Posted August 1, 2006 expandcollapse popup#include <GuiConstants.au3> Global $Location ="",$CurrentChild =1 $provider = "handmatig" Dim $show = 0, $Child_[11], $children = 10, $Label_[11][4] $Main = GuiCreate("Internet Wizzard stap 1", 516, 323, (@DesktopWidth-516)/2, (@DesktopHeight-323)/2) $Button_1 = GuiCtrlCreateButton("&Next >", 335, 290, 80, 25) $Button_2 = GuiCtrlCreateButton("< &Back", 250, 290, 80, 25) $Button_3 = GuiCtrlCreateButton("&Exit", 420, 290, 80, 25) $Button_6 = GuiCtrlCreateButton("", 10, 270, 495, 3, -1, $WS_EX_STATICEDGE) GuiSetState() $Child_[1] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) WinSetTitle ( "Internet Wizzard stap 1", "", "Internet Wizzard stap 2" ) $Label_[1][0] = GuiCtrlCreateLabel("Hartelijk welkom bij de e-mail configuratie wizzard.", 10, 10, 500, 30) $Label_[1][1] = GuiCtrlCreateLabel("Zorg dat u de papieren van uw internet provider bij de hand heeft.", 10, 25, 500, 30) $Label_[1][2] = GuiCtrlCreateLabel("Hierop staan namelijk de benodigde gegevens vermeld.", 10, 40, 500, 30) GuiSetState() $Child_[2] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) WinSetTitle ( "Internet Wizzard stap 2", "", "Internet Wizzard stap 3" ) $Label_[2][0] = GuiCtrlCreateLabel("Kies uw provider uit de onderstaande lijst.", 10, 10, 290, 30) $Label_[2][1] = GuiCtrlCreateLabel("Indien uw provider er niet bij staat kies dan voor geavanceerd", 10, 25, 500, 30) $pro = GUICtrlCreateCombo ("@home", 10,50,100) ; create first item $Child_[3] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_[3][0] = GuiCtrlCreateLabel("Child 3."& $provider, 30, 30, 290, 30) GuiSetState(@SW_HIDE) $Child_[4] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_[4][0] = GuiCtrlCreateLabel("Child 4.", 40, 40, 290, 30) GuiSetState(@SW_HIDE) $Child_[5] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_[5][0] = GuiCtrlCreateLabel("Child 5.", 50, 50, 290, 30) GuiSetState(@SW_HIDE) $Child_[6] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_[6][0] = GuiCtrlCreateLabel("Child 6.", 60, 60, 290, 30) GuiSetState(@SW_HIDE) $Child_[7] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_[7][0] = GuiCtrlCreateLabel("Child 7.", 70, 70, 290, 30) GuiSetState(@SW_HIDE) $Child_[8] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_[8][0] = GuiCtrlCreateLabel("Child 8.", 80, 80, 290, 30) GuiSetState(@SW_HIDE) $Child_[9] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_[9][0] = GuiCtrlCreateLabel("Child 9.", 90, 90, 290, 30) GuiSetState(@SW_HIDE) $Child_[10] = GuiCreate("", 508, 238, 1, 1, BitOr($WS_CHILD,$WS_TABSTOP)+$WS_DLGFRAME ,-1, $main) $Label_[10][0] = GuiCtrlCreateLabel("Child 10..... You Must be Nuts if you have ... 10 Children!!!", 50, 100, 390, 30) GUICtrlSetFont(-1, 10, 650) GuiSetState(@SW_HIDE) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $Button_3 ExitLoop Case $msg = $Button_1 $CurrentChild = Set_Next() Case $msg = $Button_2 $CurrentChild = Set_Back() Case $msg = $pro $Location = GuiCtrlRead($pro) MsgBox(0,"$Location",$Location) EndSelect ConsoleWrite($CurrentChild&@LF) If $CurrentChild = 3 Then ;MsgBox(0,"$Location",$Location) If GUICtrlRead($Label_[3][0]) <> $Location Then GUICtrlSetData($Label_[3][0],$Location) EndIf EndIf WEnd ;--------- Functions ------------------- Func Set_Next() For $x = 1 to $children -1 $Nwin = WinGetState( $child_[$x] ) If $Nwin > 5 Then GuiSetState( @SW_HIDE, $child_[$x]) GuiSetState( @SW_SHOW, $child_[$x +1]) Return $x+1 EndIf Next EndFunc Func Set_Back() For $x = $children To 1 Step -1 $Nwin = WinGetState( $child_[$x] ) If $Nwin > 5 Then GuiSetState( @SW_HIDE, $child_[$x]) GuiSetState( @SW_SHOW, $child_[$x -1]) Return $x-1 EndIf Next EndFunc Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
raedts Posted August 3, 2006 Author Share Posted August 3, 2006 This solution work's perfect!... Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now