1 post in this topic
I am trying to allow the GUI to gather info as to when to execute a function. I am having trouble doing this. So far this is what I have.
;Timer Func timer () If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(36,"Timer","Please format your answer in 00:00:00:000") Select Case $iMsgBoxAnswer = 6 ;Yes Global $infotime = InputBox ('Time', 'What time to execute?') Do $rawtimer = ToolTip(@Hour & ':' & @Min & ':' & @Sec & ':' & _MSec()) until $rawtimer = $infotime if $rawtimer = $infotime Then msgbox (0,'Worked','Worked') Else EndIf Case $iMsgBoxAnswer = 7 ;No Exit EndSelect EndFunc Func _MSec() Local $stSystemTime = DllStructCreate('ushort;ushort;ushort;ushort;ushort;ushort;ushort;ushort') DllCall('kernel32.dll', 'none', 'GetSystemTime', 'ptr', DllStructGetPtr($stSystemTime)) $sMilliSeconds = StringFormat('%03d', DllStructGetData($stSystemTime, 8)) $stSystemTime = 0 Return $sMilliSeconds EndFunc I have also tried _GUIToolTip_GetText in order to read the tooltip until the time specified, but it still doesn't work. Any help would be great.
I searched a lot here but didn't find what I want. Most of them were countdown and other stuff and back to 2004.
I just want a normal timer that when a button on gui is pressed, it starts from 00:00:00 and goes up.
I need execute a function at a certain time for example at 00:00 and 12:00.
My initial idea is use a infinite loop that take the time system and compare with the specified time.
I do not know if this is the right way to do it. I think this must have occupied the processor for a long time.
I would appreciate if comment on whether this is the system that you would use to do this kind of task
or if you know any UDF to perform this function.
Thanks to all
I am looking for a quick tip on why my autoit script crashes when I run a timer. Currently I have this code:
....(more code above this)....
_Timer_setTimer($hGUI, 3200, "_timedout")
Msgbox(0, "Timed out", "Time is up!")
When the button is pressed, my timer starts, correct? It doesnt seem to matter if I have it on button activation or not, after the time goes by for a bit, it crashes.
Seemingly when the time is up, my script crashes.
Thanks for your help!
Hello, i havê been reading, and thinking.. Im on my tablet só i WLL try explain what im trying to do....
Will havê an GUI with 8 timer input that havê to set timer, but wen our if 2 our more ends at some time it havê to run 1, then outher , then outher
Timer 1, - input 5 minutes, timer 2 - input 10, timer 3 input 15, timer 4 - input 8,......
At some time, timer 1 will end ate some time of timer 2 / then it at some time will end at some time timer 2 and 3
How i said that wen it happpens first is 2 then 1, then outhers and if 1 is done then 1st is 3, will have more than 9 input boxes that can happen it end at some time, imagine if wen timer 1= 0 function1(), then after end funciona start countdown again, if timer 2 = 0 run function2(), then after end function2 start contdoen again, if both =0 at some time first run 1 then 2, and if wen ends 1, 2,3,4 are =0 :-( :-( :-( im lost
Thanks for time, any ideas???