Custom Query
Results (292 - 294 of 3893)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #2673 | Rejected | AdlibRegister(0) execute function instanly instead of after 250ms | anonymous | |
| Description |
In current AutoIt version, AdlibRegister with negative or zero timeout will be auto correct to 250 ms. By allowing AdlibRegister with zero parameter, user will be free to setup a dispatch for a long-time-running business function. Think the case you need to execute long-time running function but also want to process event like button click, you cannot using an "Dummy" control because it also use the same event queue with a normal button, so your normal button click will be cached and execute after the long-time running function). Of course you can set up some code to provide work around but i think AdlibRegister is the fastest way. Currenly I use AdlibRegister(1) to get an acceptable solution, but I think allowing AdlibRegister(0) will provide more advantage, especially in concurrency. In a heavy application, some action will be occur in 1 ms delay. |
|||
| #1428 | Fixed | AdlibUnRegister function name is case sensitive. | Jon | martin |
| Description |
If the function name passed to AdlibUnregister does not match a function passed to AdlibRegister exactly then it has no effect. Example AdlibRegister("MyAdlib")
sleep(2000)
AdlibUnRegister("Myadlib")
ConsoleWrite("after unreg" & @CRLF)
sleep(4000)
Func MyAdlib()
ConsoleWrite("in func" & @CRLF)
EndFunc
|
|||
| #1944 | No Bug | AdlibUnRegister not working trusty | Devol | |
| Description |
Hello, Here an example: #include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)
Global $Label, $iPos = 0 , $sleep = 10
$Form1 = GUICreate("Adlibtest - Sleep("&$sleep&")", 240, 100, 990, 30)
GUISetOnEvent(-3, "_Exit")
$Label = GUICtrlCreateLabel("Testlabel", 25, 14, 300, 16)
GUICtrlSetFont(-1, 11, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Start",15,50,60,40)
GUICtrlSetOnEvent(-1,"_startadlib")
$Button2 = GUICtrlCreateButton("Stop",120,50,60,40)
GUICtrlSetOnEvent(-1,"_stopadlib")
GUISetState(@SW_SHOW)
While Sleep($sleep) ; the higher the sleep , the more often the labelswitch fails
WEnd
Func _startadlib()
GUICtrlSetData($Label,"Running")
AdlibRegister("_Laufschrift")
EndFunc
Func _stopadlib()
AdlibUnRegister("_Laufschrift")
GUICtrlSetData($Label,"Stopped") ; labelswitch failing sometimes
EndFunc
Func _Exit()
Exit
EndFunc
Func _Laufschrift()
GUICtrlSetData($Label, StringMid("Running", $iPos) & " " & "Running")
$iPos += 1.8
If $iPos > StringLen("Running") Then $iPos = 0
EndFunc
I tested this script on several pcs but the behavoir is always the same. AdlibUnRegister sometimes
You can try the examplescript , just click the buttons "Start" and "Stop" by turns.(wait 1-2 secs. before clicking stop) Sooner or later the label will be stopped on "Running Running Running" despite of the GuictrlsetData($Label,"Stopped"). Bug or not? :) Greetz Devol PS: I talked to the german forum before opening this ticket. |
|||
