Jump to content
Sign in to follow this  

Simple program help

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:)


Share this post

Link to post
Share on other sites

I found how the refresh/update works now just 1 problem left but can't figure that one out:( and it's the most important one xD

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.