pcdestroyer Posted January 30, 2005 Share Posted January 30, 2005 ok i have made a gui window and then there is a button ... how can i make when i click the button another gui window will pop up ? expandcollapse popup#include <GUIConstants.au3> Global $Difficulty=1 GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetBkColor (0x487CEA) GUISetHelp("notepad") ; will run notepad if F1 is typed $SlotConfiguration=GUICtrlCreateLabel ("Slot Configuration", 10, 10, 500, 50) $Difficulty_label = GUICtrlCreateLabel ("Difficulty", 10, 50, 50) ; first cell 50 width $Normal = GUICtrlCreateRadio ("Normal", 10, 70, 50, 20) $Nightmare = GUICtrlCreateRadio ("Nightmare", 10, 90, 65, 20) $Hell = GUICtrlCreateRadio ("Hell", 10, 110, 50, 20) $okbutton = GUICtrlCreateButton ("OK", 200, 200, 50) $AccountPassword = GUICtrlCreateLabel ("Account and Password:", 95, 50, 115) $Account = GUICtrlCreateInput ("AccountName", 95, 75, 80, 20) $Passoword = GUICtrlCreateInput ("Password", 95, 105, 80, 20) $Character = GUICtrlCreateLabel ("Character Position:", 10, 140, 115) $CharacterCombo = GUICtrlCreateCombo ("1", 10,160,35) $HelpChar= GUICtrlCreateButton ("?", 50, 157, 17) GUICtrlSetData($CharacterCombo,"2|3|4|5|6|7|8","1") GUICtrlSetColor($SlotConfiguration,0xDD0609) GUICtrlSetState ($Normal,$GUI_CHECKED) GUICtrlSetFont ($SlotConfiguration,18, 400, 6, "Comic Sans MS") GUISetState () ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $Normal $Difficulty = 1 Case $msg = $Nightmare $Difficulty = 2 Case $msg = $Hell $Difficulty = 3 endselect If $msg = $HelpChar then ; .... how do i do it ?? endif ;568 515 If $msg = $GUI_EVENT_CLOSE Then ExitLoop wend Link to comment Share on other sites More sharing options...
martin Posted January 30, 2005 Share Posted January 30, 2005 ok i have made a gui window and then there is a button ... how can i make when i click the button another gui window will pop up ?Have a look at GUISwitch and the example in the help file. 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. Link to comment Share on other sites More sharing options...
phillip123adams Posted January 30, 2005 Share Posted January 30, 2005 ok i have made a gui window and then there is a button ... how can i make when i click the button another gui window will pop up ?Your script with a second GUI for the help button:expandcollapse popup#include <GUIConstants.au3> Global $Difficulty = 1 ;; Define the Main GUI $gui1 = GUICreate("My GUI"); will create a dialog box that when displayed is centered GUISetBkColor(0x487CEA) GUISetHelp("notepad"); will run notepad if F1 is typed $SlotConfiguration = GUICtrlCreateLabel("Slot Configuration", 10, 10, 500, 50) $Difficulty_label = GUICtrlCreateLabel("Difficulty", 10, 50, 50); first cell 50 width $Normal = GUICtrlCreateRadio("Normal", 10, 70, 50, 20) $Nightmare = GUICtrlCreateRadio("Nightmare", 10, 90, 65, 20) $Hell = GUICtrlCreateRadio("Hell", 10, 110, 50, 20) $okbutton = GUICtrlCreateButton("OK", 200, 200, 50) $AccountPassword = GUICtrlCreateLabel("Account and Password:", 95, 50, 115) $Account = GUICtrlCreateInput("AccountName", 95, 75, 80, 20) $Passoword = GUICtrlCreateInput("Password", 95, 105, 80, 20) $Character = GUICtrlCreateLabel("Character Position:", 10, 140, 115) $CharacterCombo = GUICtrlCreateCombo("1", 10, 160, 35) $HelpChar = GUICtrlCreateButton("?", 50, 157, 17) GUICtrlSetData($CharacterCombo, "2|3|4|5|6|7|8", "1") GUICtrlSetColor($SlotConfiguration, 0xDD0609) GUICtrlSetState($Normal, $GUI_CHECKED) GUICtrlSetFont($SlotConfiguration, 18, 400, 6, "Comic Sans MS") ;; Define the Help GUI $gui2 = GUICreate("HELP", 300, 200, 200, 200) ;;? GUISetHelp("notepad"); will run notepad if F1 is typed $okbuttonhelp = GUICtrlCreateButton("OK", 100, 100, 50) GUISetState(@SW_SHOW, $gui1); display GUI #1 $gui = 1 ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $gui = 1 Then ; The Main GUI is active Select Case $msg = $Normal $Difficulty = 1 Case $msg = $Nightmare $Difficulty = 2 Case $msg = $Hell $Difficulty = 3 Case $msg = $okbutton MsgBox(4096, "OK clicked", "do something for the OK button") Case $msg = $HelpChar GUISetState(@SW_SHOW, $gui2); display GUI #2 GUISwitch($gui2) GUISetState(@SW_hide, $gui1); hide GUI #1 $gui = 2 case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect Else ; The Help GUI is active Select Case $msg = $okbuttonhelp or $msg = $GUI_EVENT_CLOSE GUISetState(@SW_SHOW, $gui1); display GUI #1 GUISwitch($gui1) GUISetState(@SW_hide, $gui2); hide GUI #2 $gui = 1 ; put other cases for help gui here EndSelect EndIf ;;; If $msg = $HelpChar Then; .... how do i do it ?? ;;; ... ;;; EndIf ;;; ;;; If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Phillip Link to comment Share on other sites More sharing options...
pcdestroyer Posted January 30, 2005 Author Share Posted January 30, 2005 oh i finally get it ) thnx a lot phillip 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