Sign in to follow this  
Followers 0
Harmonful

Help to make Savings Program

3 posts in this topic

#1 ·  Posted (edited)

HI

Im 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 numbers

I have this:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                     ;;;
;;;             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)
EndFunc

ITS DONE THX!

Edited by Ryona

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
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
Sign in to follow this  
Followers 0