Jump to content

Recommended Posts

Posted (edited)

Ok, sorry for the extremley noob ? here.

I created a basic Gui, First one ever using Koda which rocks by the way. I was expecting it to be like VB where when I double clicked on a button it would allow me to type in what happens when the button is clicked, so on and so forth.

Well apparently it isn't like that. Can someone please give me the syntax to get this damn exit button working?

And before anyone says " Read the Help files" "You should have used search" I have, I just havne't been able to find a simple answer.

Thanks in advance.

#cs This Program was written for Internal Use by VIA Networks Employees any other use is prohibited.
    Written by T.C. Covert April 30th 2009.
#ce
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Users\tcovert\Desktop\My-AutoIt\frmInventory.kxf
$frmInventory = GUICreate("VIA Networks Internal Server Inventory", 623, 443, 195, 125)
$btnEnter = GUICtrlCreateButton("Enter", 432, 400, 89, 33, 0)
$btnExit = GUICtrlCreateButton("Exit", 528, 400, 89, 33, 0)
$picVIA = GUICtrlCreatePic("C:\Users\tcovert\Desktop\My-AutoIt\VIA.jpg", 256, 16, 121, 76, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$lblVIA = GUICtrlCreateLabel("VIA Networks Internal Server Inventory Program", 200, 104, 230, 17)
$lblTC = GUICtrlCreateLabel("Created by T.C. Covert", 264, 128, 112, 17)
$lblQuestion = GUICtrlCreateLabel("What Do You Want To Inventory?", 240, 168, 167, 17)
GUICtrlCreateInput("", 272, 304, 105, 21)
$lblRemoteIP = GUICtrlCreateLabel("Please Enter Remote Server IP Address", 232, 280, 192, 17)
$Checkbox1 = GUICtrlCreateCheckbox("Local Machine", 264, 200, 105, 25)
$Checkbox2 = GUICtrlCreateCheckbox("Remote Machine", 264, 240, 105, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Checkbox1
        Case $Checkbox2
    EndSwitch
WEnd
Edited by atnextc

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
  • Recently Browsing   0 members

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