Modify

#1633 closed Bug (Fixed)

Second AdlibRegister function starts at once when first function is to slow

Reported by: funkey Owned by: Jon
Milestone: 3.3.7.7 Component: AutoIt
Version: 3.3.6.0 Severity: None
Keywords: Cc:

Description

If you have at least two funtions startet by AdlibRegister an one function is to slow, then the second one starts at once.
See the example. Try with less and more sleep time.

Opt('GUIOnEventMode', 1)
GUICreate("Bugtest AdlibRegister", 300, 50)
GUISetOnEvent(-3, "_Exit")

GUICtrlCreateCheckbox("Switch adlib function", 10, 20)
GUICtrlSetOnEvent(-1, "_StartAdlib")
GUICtrlSetState(-1, 4)

GUISetState()
AdlibRegister("_Something", 100)

While 1
	Sleep(100000)
WEnd

Func _StartAdlib()
	Local $CheckBoxState = GUICtrlRead(@GUI_CtrlId)
	ToolTip($CheckBoxState)
	If $CheckBoxState = "1" Then
		AdlibRegister("_Adlib", 60000 * 10)	;10 Minutes
		ConsoleWrite("1" & @cr)
	Else
		AdlibUnRegister("_Adlib")
		ConsoleWrite("0" & @cr)
	EndIf
EndFunc

Func _Something()
	Sleep(50)	; with 50 msec delay sometimes _Adlib() is called!
;~ 	Sleep(100)	; with 100 msec delay _Adlib() is called allways!
EndFunc

Func _Adlib()
	ConsoleWrite("Adlib function called!!" & @cr)
EndFunc

Func _Exit()
	Exit
EndFunc

Attachments (0)

Change History (4)

comment:1 by Jpm, on May 21, 2010 at 5:10:00 PM

Milestone: 3.3.7.0
Owner: set to Jpm
Resolution: Fixed
Status: newclosed

Fixed by revision [5841] in version: 3.3.7.0

comment:2 by Jon, on May 28, 2011 at 4:40:49 PM

Resolution: Fixed
Status: closedreopened

comment:3 by TicketCleanup, on May 28, 2011 at 6:00:01 PM

Milestone: 3.3.7.0

Automatic ticket cleanup.

comment:4 by Jon, on May 30, 2011 at 10:02:29 PM

Milestone: 3.3.7.7
Owner: changed from Jpm to Jon
Resolution: Fixed
Status: reopenedclosed

Fixed by revision [6087] in version: 3.3.7.7

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


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