Harmonful Posted October 14, 2009 Posted October 14, 2009 (edited) HIIm trying to make a program with autoit..To write a number in a position of entry and to oppress a button and to add the number to a document and then to + all numbersI have this:expandcollapse popup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ;;; Ahorros By : ;;; ;;; ;;; ;;; Max ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;////INCLUDES\\\\ #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <File.au3> #Include <GuiEdit.au3> ;_________________; Opt('MustDeclareVars', 1) _FileCreate ("Cuenta.txt" ) WINDOW () Func WINDOW () Local $msg, $number, $button GUICreate ( "Ahorros" ) GUISetState(@SW_SHOW) GUICtrlCreateGroup ( "Suma", 10,1 , 200, 100) GUICtrlCreateLabel( "Enter 1ยบ Number:", 15,15, 85,50 ) $number=GUICtrlCreateInput( "", 100, 10, 30 , 20 ) $button=GUICtrlCreateButton("Add", 50, 45, 100 ) GUISetOnEvent ($button, "button" ) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() EndFunc Func button () Local $check $check=_GUICtrlEdit_GetText ($number) FileOpen ("Cuenta.txt", 1) FileWrite ("Cuenta.txt", $check) EndFuncITS DONE THX! Edited October 14, 2009 by Ryona
FuryCell Posted October 14, 2009 Posted October 14, 2009 You dont have onevent mode set. Also if you are using it you need GuiCtrlSetOnEvent for a button, not GUISetOnEvent. HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Harmonful Posted October 14, 2009 Author Posted October 14, 2009 You dont have onevent mode set. Also if you are using it you need GuiCtrlSetOnEvent for a button, not GUISetOnEvent. Thx it works for me:D
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