Search the Community
Showing results for tags 'adlib'.
-
Function Reference _AdlibEnhance.au3 Adlib function with support for parameters, pause and resume using Call Back! Sintax: _Adlib_Register( "Function" [, "Params" [, Time [, RepeatCount ]]] ) _Adlib_Pause( "Function" ) _Adlib_Resume( "Function" ) _Adlib_SetTimer( "Function" [, Time ] ) _Adlib_UnRegister( "Function" ) Supports: ; You can call functions with parameters and native functions also! Downloads: Version: 0.10 _AdlibEnhance_(RedirectLink).html Note: Usage example is included! Sample: Fixes: Regards, João Carlos.
- 22 replies
-
- adlib
- adlibregister
-
(and 3 more)
Tagged with:
-
AdlibRegister("ScriptBreaker", 1000 * 10) FileMove($large_10GB_file, $relocated_large_10GB_file) Func ScriptBreaker() Sleep(1000 * 10) EndFunc ; Will adlib break the file or pause the transfer??
-
Let start with some examples: 1. (As seen in another topic: '?do=embed' frameborder='0' data-embedContent>> ). Script copied from that topic Interrupt function can be any hotkey/event/adlib/callback. If-check inside interrupted function/script ; HotKeySet, or any function that can cause script interrupt HotKeySet("{Delete}", "RemoveSelectedControl") ;... Dim $InfoAboutControls[4096] Global $HandleForCurrentControl ;... While 1 $msg = GuiGetMsg() ;.... ;---Code to process moving a control (drag-n-drop)--- ; If check in MAIN LOOP (interruptible function). If $HandleForCurrentControl > 0 Then;Make sure we have a valid control handle ; ***** oops user pressed Delete key and we get pre-empted ; ***** user removed the selected control. ; ***** Returning from the RemoveSelectedControl function and resuming here: GuiCtrlSetPos($InfoAboutControls[$HandleForCurrentControl], $newLeftPosition, $newTopPosition) EndIf WEnd Func RemoveSelectedControl() $HandleForCurrentControl = -1 EndFunc 2. If-check inside interrupt function Hotkey only. Flag is set right after if check. It's possible or not this function print twice or more? HotKeySet("{Delete}", "_TestHotkey") Func _TestHotkey() Static $bFlag = True If ($bFlag) Then ; ***** Right here, user pressed Delete key ; ***** bFlag is currently not set ; ***** And the script will execute this function twice or more times, instead of just once $bFlag = False ConsoleWrite("This should be printed only ONCE") EndIf EndFunc 3. Same as 2, but with global flag The question is: can I rely on if-checking with a flag, to ensure that my script doesn't do any strange things, as describe in the above examples?