Skip to content

genius257/au3timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

au3timer

The power of timer based calls in AutoIt3

Inspired by JS.

You can now request a function to be called once or repeatedly with up to 9 parameters.

usage

#include "Timer.au3"

setTimeout('MyExit', 10000)

setTimeout('MsgBox', 5000, 0, "title", "message")

setInterval('WriteTime', 1000)

Func WriteTime()
    ConsoleWrite(StringFormat("%02i:%02i:%02i.%03i\n", @HOUR, @MIN, @SEC, @MSEC))
EndFunc

Func MyExit()
    Exit
EndFunc

While 1
    Sleep(10)
WEnd

setTimeout

call function once after a defined duration

syntax
setTimeout($function [, $delay = 0 [, $arg1 [, $arg2 [, $arg3 [, $arg4 [, $arg5 [, $arg6 [, $arg7 [, $arg8 [, $arg9]]]]]]]]])
arguments
variable type description
$function string function name
$delay integer call delay in milliseconds
$arg1...$arg9 mixed arguments to be passed to the function call
return
type description
integer Timer ID

setInterval

call function repeatedly after a defined duration

if the called function sets @error <> 0 then the setInterval will be cancelled

syntax
setInterval($function [, $delay = 0 [, $arg1 [, $arg2 [, $arg3 [, $arg4 [, $arg5 [, $arg6 [, $arg7 [, $arg8 [, $arg9]]]]]]]]])
arguments
variable type description
$function string function name
$delay integer call delay in milliseconds
$arg1...$arg9 mixed arguments to be passed to the function call
return
type description
integer Timer ID

About

The power of timer based calls in AutoIt3

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages