Modify

Opened 10 years ago

Closed 10 years ago

#3218 closed Bug (No Bug)

_Timer_KillTimer don't kill timer.

Reported by: autoBert Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.2 Severity: None
Keywords: Cc:

Description

    #include <Timers.au3>

Global $hGUI, $g_iIDTimer

_Example_TimeOut()

Func _Example_TimeOut()
	Local $hGUI = GUICreate("", 140, 64, -1, -1, 0)
	GUICtrlCreateLabel("Waiting for timeout", 8, 8, 115, 17)
	GUISetState(@SW_SHOW)

	$g_iIDTimer = _Timer_SetTimer($hGUI, 10000, "TimedOut") ; create timer
	ConsoleWrite($g_iIDTimer&@CRLF)
	While 1
		Sleep(20)
		If GUIGetMsg()= -3 Then ExitLoop
	WEnd
	GUIDelete($hGUI)
EndFunc   ;==>_Example_TimeOut

Func TimedOut($hWnd, $iMsg, $iIDtimer, $iTime)
	#forceref $hWnd, $iMsg, $iIDTimer,$iTime
	_Timer_KillTimer($hGUI,$g_iIDTimer)
	ConsoleWrite('TimedOut happend'&@error&@CRLF)
	ConsoleWrite($__g_aTimers_aTimerIDs[1][0]&@CRLF);<=== shows $g_iIDTimer which i have deleted 
EndFunc   ;==>TimedOut

Attachments (0)

Change History (2)

comment:1 by autoBert, 10 years ago

and error found, sorry first ticket and a False Positive

comment:2 by J-Paul Mesnage, 10 years ago

Resolution: No Bug
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.