Hello,
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:
AutoIt
#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $hours, $Input1 Opt("GUIOnEventMode", 1) Load() Func Load() $hours = IniRead (@ScriptDir & "\" & "uren.ini", "uren", "uren", "Error") Main() EndFunc 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") GUISetState() EndFunc While 1 Sleep(10) WEnd Func Close() Exit EndFunc Func Submit() $hours = $hours + $Input1 IniWrite (@ScriptDir & "\" & "uren.ini", "uren", "uren", $hours) EndFunc
Hope someone can help me out:)
Greetz.