Jump to content

Help with my lovely GUI


Recommended Posts

Ok I have been scripting sucessfully in AutoIT for a while but I have never used the GUI funtion. I have created my gui with this code

GuiCreate("MyGUI", 260, 370,(@DesktopWidth-260)/2, (@DesktopHeight-370)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Input_1 = GuiCtrlCreateInput("Input1", 130, 30, 90, 20)

$Label_2 = GuiCtrlCreateLabel("Hostname", 39, 34, 90, 14)

$Checkbox_3 = GuiCtrlCreateCheckbox("RCS", 60, 70, 100, 20)

$Checkbox_4 = GuiCtrlCreateCheckbox("RDCS", 60, 90, 100, 20)

$Checkbox_5 = GuiCtrlCreateCheckbox("RIS", 60, 110, 100, 20)

$Checkbox_6 = GuiCtrlCreateCheckbox("Client", 60, 130, 100, 20)

$Checkbox_7 = GuiCtrlCreateCheckbox("Proxy", 60, 150, 100, 20)

$Checkbox_8 = GuiCtrlCreateCheckbox("RMA", 60, 170, 100, 20)

$Checkbox_9 = GuiCtrlCreateCheckbox("Configure EDMPROF.dat", 60, 190, 140, 20)

$Group_10 = GuiCtrlCreateGroup("Install Options", 40, 55, 180, 165)

$Group_11 = GuiCtrlCreateGroup("Tier", 40, 235, 180, 45)

$Radio_12 = GuiCtrlCreateRadio("1", 80, 250, 30, 20)

$Radio_13 = GuiCtrlCreateRadio("2", 130, 250, 30, 20)

$Radio_14 = GuiCtrlCreateRadio("3", 180, 250, 30, 20)

$Button_15 = GuiCtrlCreateButton("Submit", 50, 300, 80, 30)

$Button_16 = GuiCtrlCreateButton("Exit", 140, 300, 80, 30)

$Label_17 = GuiCtrlCreateLabel("© Norwich Union 2005", 80, 340, 130, 20)

$Label_18 = GuiCtrlCreateLabel("Radia Server Auto-Build", 68, 8, 120, 22)

GuiSetState()

Now I haven't used this before but I want to be able to make it so when the submit button is pressed all the values are saved into variables and it continues the script. Also want it to exit if the exit button is pressed. I am sure I am almost there.

Any help will be so appreiciated. I have read the manual but find it hard to understand as I have never done any visual programming.

Regards and thanks in advance for any hewlp

Dan

Link to comment
Share on other sites

To get the value use GUICtrlRead() and it will tell you different things for what control you use it on. Look in the help file for information under GUICtrlRead().

As more exiting... we use GUIGetMsg() to check if an event as occured. You should get used to it as every single GUI script will include this, look at all the examples in the help file for the GUICtrlCreate controls.

While 1
   $msg = GUIGetMsg()
   If $msg = $button_16 Then Exit
Wend
Edited by Burrup

qq

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...