3 posts in this topic
I'd like to create a gui wich records the total runtime of the script.
It should tell the hours,minutes and seconds (like this: Running since 00:00:00)
This is what I have right now:
Local $iTimer, $hGUI, $cLabel $iTimer = TimerInit() $hGUI = GUICreate("") $cLabel = GUICtrlCreateLabel("",300,380,100,20) GUISetState() AdlibRegister("_UpdateLabel",1000) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit EndSwitch Wend Func _UpdateLabel() $iTimerDiff = TimerDiff($iTimer) GUICtrlSetData($cLabel,"Running Since " & Round($iTimerDiff/1000,0) & " sec.") EndFunc Thanks in advance
lately I was working on a script... Good thing: the script works well. Bad thing: I would like to create a nice GUI which consists of various elements (1. Start Button, 2. Stop Button, 3. Input [to define the time which the script should work], 4. Timer [which counts the total runtime of the script]). Problem: I know how to create the GUI but I don't know how to create the timers and stuff. I visited some forum sites but I just don't understand how the whole timer stuff works .
Maybe someone could help me...
Thanks in advance
I have a text field in my scripts gui which displays the current runtime. I usually update it using a function, in the script, but i was wondering if there is any other way to keep the Runtime running without having to call the runtime function again and again and while my script is carrying out something else and running other functions. I mean autoit does'nt support multithreading does it?