Jump to content

Simple program help

Go to solution Solved by satanttin,

Recommended Posts


I was trying to make an application to manage my hours very easily but i got stuck. everything i add hours it just adds 4 hours which is strange:O

i wantit to be when i add 1 hours it add on and 10 hours 10 hours like it should be.

and another question is that i want it to be automaticly refresh after i press the submit button.

The code i have so far is:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $hours, $Input1

Opt("GUIOnEventMode", 1)


Func Load()
   $hours = IniRead (@ScriptDir & "\" & "uren.ini", "uren", "uren", "Error")

Func main()
$Form1 = GUICreate("Uren: Tijn Tinnenbroek", 545, 122, 192, 124)
$Label1 = GUICtrlCreateLabel("Number of hours i worked: "& $hours, 8, 16, 528, 36)
GUICtrlSetFont(-1, 20, 400, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("Input1", 184, 80, 73, 21)
$Button1 = GUICtrlCreateButton("Add Hours", 256, 80, 75, 25)
GUIctrlSetOnEvent($Button1, "Submit")
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")

While 1

Func Close()

Func Submit()
   $hours = $hours + $Input1
   IniWrite (@ScriptDir & "\" & "uren.ini", "uren", "uren", $hours)

Hope someone can help me out:)


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

  • Recently Browsing   0 members

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