wizard Posted October 7, 2009 Posted October 7, 2009 hi i made this tool using koda. I want my buttons to do certain actions, eg Save, load, and Clear the group buttons, can anyone please help me with the Gui. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Admin\Local Settings\Temp\Rar$EX00.688\Forms\Form11.kxf $Form1 = GUICreate("Form1", 154, 426, 192, 124) $Group1 = GUICtrlCreateGroup("Group1", 8, 8, 137, 409) $Input1 = GUICtrlCreateInput("id1", 16, 24, 121, 21) $Input2 = GUICtrlCreateInput("id2", 16, 48, 121, 21) $Input3 = GUICtrlCreateInput("id3", 16, 72, 121, 21) $Input4 = GUICtrlCreateInput("id4", 16, 96, 121, 21) $Input5 = GUICtrlCreateInput("id5", 16, 120, 121, 21) $Input6 = GUICtrlCreateInput("id6", 16, 144, 121, 21) $Input7 = GUICtrlCreateInput("id7", 16, 168, 121, 21) $Input8 = GUICtrlCreateInput("id8", 16, 192, 121, 21) $Input9 = GUICtrlCreateInput("id9", 16, 216, 121, 21) $Input10 = GUICtrlCreateInput("id10", 16, 240, 121, 21) $Input11 = GUICtrlCreateInput("id11", 16, 264, 121, 21) $Input12 = GUICtrlCreateInput("id12", 16, 288, 121, 21) $Input13 = GUICtrlCreateInput("pasword", 16, 320, 121, 21) $save = GUICtrlCreateButton("save", 16, 360, 59, 17) $load = GUICtrlCreateButton("load", 80, 360, 59, 17) $clear = GUICtrlCreateButton("clear", 16, 384, 123, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
enaiman Posted October 9, 2009 Posted October 9, 2009 This is the way: expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Admin\Local Settings\Temp\Rar$EX00.688\Forms\Form11.kxf $Form1 = GUICreate("Form1", 154, 426, 192, 124) $Group1 = GUICtrlCreateGroup("Group1", 8, 8, 137, 409) $Input1 = GUICtrlCreateInput("id1", 16, 24, 121, 21) $Input2 = GUICtrlCreateInput("id2", 16, 48, 121, 21) $Input3 = GUICtrlCreateInput("id3", 16, 72, 121, 21) $Input4 = GUICtrlCreateInput("id4", 16, 96, 121, 21) $Input5 = GUICtrlCreateInput("id5", 16, 120, 121, 21) $Input6 = GUICtrlCreateInput("id6", 16, 144, 121, 21) $Input7 = GUICtrlCreateInput("id7", 16, 168, 121, 21) $Input8 = GUICtrlCreateInput("id8", 16, 192, 121, 21) $Input9 = GUICtrlCreateInput("id9", 16, 216, 121, 21) $Input10 = GUICtrlCreateInput("id10", 16, 240, 121, 21) $Input11 = GUICtrlCreateInput("id11", 16, 264, 121, 21) $Input12 = GUICtrlCreateInput("id12", 16, 288, 121, 21) $Input13 = GUICtrlCreateInput("pasword", 16, 320, 121, 21) $save = GUICtrlCreateButton("save", 16, 360, 59, 17) $load = GUICtrlCreateButton("load", 80, 360, 59, 17) $clear = GUICtrlCreateButton("clear", 16, 384, 123, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $save ;the buttons/controls handles goes here, every one with its own "case" statement Saving() ;this function is executed upon event EndSwitch WEnd Func Saving() MsgBox(0, "SAVING", "That's how I'm doing it") EndFunc ... some more reading won't hurt at all ... SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
wizard Posted October 9, 2009 Author Posted October 9, 2009 This is the way: expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Admin\Local Settings\Temp\Rar$EX00.688\Forms\Form11.kxf $Form1 = GUICreate("Form1", 154, 426, 192, 124) $Group1 = GUICtrlCreateGroup("Group1", 8, 8, 137, 409) $Input1 = GUICtrlCreateInput("id1", 16, 24, 121, 21) $Input2 = GUICtrlCreateInput("id2", 16, 48, 121, 21) $Input3 = GUICtrlCreateInput("id3", 16, 72, 121, 21) $Input4 = GUICtrlCreateInput("id4", 16, 96, 121, 21) $Input5 = GUICtrlCreateInput("id5", 16, 120, 121, 21) $Input6 = GUICtrlCreateInput("id6", 16, 144, 121, 21) $Input7 = GUICtrlCreateInput("id7", 16, 168, 121, 21) $Input8 = GUICtrlCreateInput("id8", 16, 192, 121, 21) $Input9 = GUICtrlCreateInput("id9", 16, 216, 121, 21) $Input10 = GUICtrlCreateInput("id10", 16, 240, 121, 21) $Input11 = GUICtrlCreateInput("id11", 16, 264, 121, 21) $Input12 = GUICtrlCreateInput("id12", 16, 288, 121, 21) $Input13 = GUICtrlCreateInput("pasword", 16, 320, 121, 21) $save = GUICtrlCreateButton("save", 16, 360, 59, 17) $load = GUICtrlCreateButton("load", 80, 360, 59, 17) $clear = GUICtrlCreateButton("clear", 16, 384, 123, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $save ;the buttons/controls handles goes here, every one with its own "case" statement Saving() ;this function is executed upon event EndSwitch WEnd Func Saving() MsgBox(0, "SAVING", "That's how I'm doing it") EndFunc ... some more reading won't hurt at all ... Thanks for the help, but I want my button SAVE to save eg, one,two,three..., button CLEAR, must clear eg, one,two,three.., button LOAD must load the saved info eg,one,two,three... can you also maybe tell me where to read more..
rliiack Posted October 10, 2009 Posted October 10, 2009 Use the GUICtrlSetData for load and Clear and use GUICtrlRead to read inputs to save. My Projects:Smart Icons
jebus495 Posted October 10, 2009 Posted October 10, 2009 Pretty much anything starting with "GUICTRL" is about something you see and click on and does stuff. Read all about them. Go through them all and you'll wonder why you posted here in the first place.
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