AdlibUnRegister: Difference between revisions
Jump to navigation
Jump to search
(Created page with "===Function=== AdlibUnRegister ===Description=== Unregisters an adlib function. ===Syntax=== <syntaxhighlight lang='autoit'> AdlibUnRegister ( ["function"] ) </syntaxhighlig...") |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Description== | |||
Unregisters an adlib function. | Unregisters an adlib function. | ||
==Syntax== | |||
<syntaxhighlight lang='autoit'> | <syntaxhighlight lang='autoit'> | ||
AdlibUnRegister ( ["function"] ) | AdlibUnRegister ( ["function"] ) | ||
Line 11: | Line 8: | ||
==Parameters== | |||
{| border='1' class='wikitable' | {| border='1' class='wikitable' | ||
| function || [optional] The name of the adlib function to be Unregistered. See remarks for more information. | | function || [optional] The name of the adlib function to be Unregistered. See remarks for more information. | ||
Line 17: | Line 14: | ||
|} | |} | ||
==ReturnValue== | |||
The number of adlib functions currently registered. | The number of adlib functions currently registered. | ||
==Remarks== | |||
If the function name is not specified then the last registered function will be unregistered. | If the function name is not specified then the last registered function will be unregistered. | ||
==Related== | |||
[[AdlibRegister]] | [[AdlibRegister]] | ||
==Example== | |||
<syntaxhighlight lang='autoit'> | <syntaxhighlight lang='autoit'> | ||
#include <MsgBoxConstants.au3> | #include <MsgBoxConstants.au3> | ||
Line 65: | Line 62: | ||
EndFunc ;==>MyAdLibFunc | EndFunc ;==>MyAdLibFunc | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 16:56, 15 August 2013
Description
Unregisters an adlib function.
Syntax
AdlibUnRegister ( ["function"] )
Parameters
function | [optional] The name of the adlib function to be Unregistered. See remarks for more information. |
ReturnValue
The number of adlib functions currently registered.
Remarks
If the function name is not specified then the last registered function will be unregistered.
Related
Example
#include <MsgBoxConstants.au3>
If ProcessExists("SciTE.exe") = 0 Then
MsgBox($MB_SYSTEMMODAL, "", "You will need SciTE.exe to be running for ConsoleWrite to display.")
EndIf
Example()
Func Example()
; Register the function MyAdLibFunc() to be called every 250ms (default).
AdlibRegister("MyAdLibFunc")
; Sleep does not stop AdLib functions from running.
Sleep(1000)
; AdLib functions don't run while a blocking function is shown e.g. MsgBox, InputBox, WinWait, WinWaitClose etc.
MsgBox($MB_SYSTEMMODAL, "", "No console message(s) will be shown whilst the messagebox is displayed.")
; The AdLib function MyAdLibFunc() will start again.
Sleep(2000)
; Unregister the function MyAdLibFunc() from being called every 250ms.
AdlibUnRegister("MyAdLibFunc")
EndFunc ;==>Example
Func MyAdLibFunc()
; Assign a static variable to hold the number of times the function is called.
Local Static $iCount = 0
$iCount += 1
ConsoleWrite("MyAdLibFunc called " & $iCount & " time(s)" & @CRLF)
EndFunc ;==>MyAdLibFunc