Jump to content

help you getting familiar with gui's


 Share

Recommended Posts

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 loop

GUiteacher.au3

Edited by seargent master
Link to comment
Share on other sites

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 by Saunders
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...