Modify

Opened 9 years ago

Closed 9 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 Changed 9 years ago by autoBert

and error found, sorry first ticket and a False Positive

comment:2 Changed 9 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.