seargent master Posted August 10, 2005 Share Posted August 10, 2005 (edited) here here is a gui run through for you guys #include <GuiConstants.au3>; Include the constants required for the gui. GuiCreate("Test", 316, 105,(@DesktopWidth-316)/2, (@DesktopHeight-105)/2);Create The GUI window. $Button_MessageBox = GuiCtrlCreateButton("Show MsgBox", 10, 10, 300, 30);Create messagebox the button $Button_InputBox = GuiCtrlCreateButton("InputBox", 10, 50, 300, 30); create the inputbox Button. GuiSetState(); Show the GUI now that the buttons are there While 1;begin while loop $msg = GuiGetMsg(); get the current message from the GUI Select;begin the select statement Case $msg = $GUI_EVENT_CLOSE; If the X in the corner of the window is clicked do the lines until the next case statment. Exit;quit the script. Case $msg = $Button_InputBox; If the InputBox button is clicked do lines until ; the next case statment. $Input=InputBox("InputBox"," "); open an input box and save its input to $Input If @Error then ContinueLoop;Dont execute the lines below if cancel is pressed. GuiCtrlSetData($Button_InputBox,$Input);Change the caption of the inputbox button to the data contained in $Input Case $msg=$Button_MessageBox; If the messagebox button is clicked do the lines until the endselect statement. MsgBox(0,"Hello","Hi");Pop up a message ox that says hello. EndSelect;end select statement WEnd;end while loopGUiteacher.au3 Edited August 10, 2005 by seargent master Link to comment Share on other sites More sharing options...
rakudave Posted August 10, 2005 Share Posted August 10, 2005 i use do .. until $msg = $GUI_EVENT_CLOSE that'll save some lines... Pangaea Ruler new, UDF: _GUICtrlCreateContainer(), Pangaea Desktops, Pangaea Notepad, SuDoku, UDF: Table Link to comment Share on other sites More sharing options...
therks Posted August 10, 2005 Share Posted August 10, 2005 (edited) here here is a gui run through for you guys...messy code......code outside the [ code ] tag...<{POST_SNAPBACK}>No offence, but there are much better examples in the help file, I can barely read this it's so cluttered up.*Edit: Pulled the actual code out, no need to have two messes in this thread. Edited August 10, 2005 by Saunders My AutoIt Stuff | My Github 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