Modify

Opened 9 years ago

Closed 9 years ago

#1907 closed Bug (Duplicate)

Bug in AdlibRegister

Reported by: claudio.veronesi@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

I think, there is a bug in AdlibRegister.
I Register a function for every 5 seconds.

The duration of this function is 4 seconds. At the beginning, I Unregister the Adlib Timer. At the end, I register it again with 5 seconds.

But then only one second later, this function is called again!

{{{{
AdlibRegister("test", 5000)
HotKeySet("{ESC}")

While 1

Sleep(5000)

WEnd
Exit

Func test()

AdlibUnRegister("test")
ToolTip("Function")
Sleep(4000)
ToolTip("")
AdlibRegister("test", 5000)
Return 1

EndFunc ;==>test
}}}}

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by mvg

Think your right.
Might already be solved with/by #1633 (Milestone: 3.3.7.0)

Output on code below ... (comment).

[0] AdlibRegister
AdlibUnRegister ... (*1, Adlib return call)
[timer] 1005.84180391642
AdlibRegister ... (*2, set to 500)
[timer] 200.836139788716 ... (200, delay between *1 and *2)
AdlibUnRegister
[timer] 304.726159330306 ... (300, Adlib return call, should probably be 500. yes?)
AdlibRegister
[timer] 203.148165479132
AdlibUnRegister
[timer] 297.781980670728
AdlibRegister
[timer] 208.376762968478
AdlibUnRegister
[timer] 296.342412233957
HotKeySet("{ESC}")

DebugOut('[0] AdlibRegister') ;### Debug DebugOut.
AdlibRegister("test", 10 * 100)
Global $iTimer = TimerInit()

While 1
	Sleep(250)
WEnd
Exit

Func test()
	Static $iBailout = 2

	DebugOut('AdlibUnRegister') ;### Debug DebugOut.
	DebugOut('[timer] ' & TimerDiff($iTimer)) ;### Debug DebugOut.
	AdlibUnRegister()
	$iTimer = TimerInit()

	if $iBailout < 0 Then Exit
	$iBailout -= 1

	Sleep(2 * 100)

	DebugOut('AdlibRegister') ;### Debug DebugOut.
	DebugOut('[timer] ' & TimerDiff($iTimer)) ;### Debug DebugOut.
	AdlibRegister("test", 5 * 100)
	$iTimer = TimerInit()
EndFunc
Func DebugOut($sMsg)
	ConsoleWrite($sMsg & @CRLF)
EndFunc

comment:2 Changed 9 years ago by Jon

  • Resolution set to Duplicate
  • 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.