AutoIt+
  • Overview
  • Getting started
  • The language
    • Basic
    • Grammar
      • Expressions
      • Statements
      • Declarations
    • Operators
    • Variables
    • Types & values
      • Null
      • Booleans
      • Numbers
      • Strings
      • Functions
      • Classes
      • Pointers
    • Control flow
      • If statement
      • For loop
      • While loop
      • Break & continue
      • Error handling
    • Collections
      • Array
        • APIs
        • Implementation
      • Map
        • APIs
        • Implementation
    • Modules
    • Exceptions
  • Built-in modules
    • C
      • APIs
      • Constants
    • Math
      • APIs
      • Constants
    • Task
      • Types
      • APIs
    • Global
  • The aup
    • Compiler
    • Runtime
    • Options
Powered by GitBook
On this page
  • .run
  • .do
  • .sched
  • .clear
  • .wait

Was this helpful?

  1. Built-in modules
  2. Task

APIs

This page provide API functions of Task module.

.run

task.run(routine: fn, args: arr) -> ptr

Execute a function in parallel.

Parameters (2)

routine

A function to be executed.

args

Parameters pass to the routine function.

Return value

.do

task.do(function: fn, delay: num) -> ptr

Call a function, with a delay time.

Parameters (2)

function

A zero-parameter function to be executed.

delay

Delay time in milliseconds.

Return value

Identifier of a timer.

.sched

task.sched(function: fn, delay: num) -> ptr

Call a function repeatedly, with a fixed time delay between each call.

Parameters (2)

function

A zero-parameter function to be executed.

delay

Delay time in milliseconds.

Return value

Identifier of a timer.

.clear

task.clear(id: ptr) -> bool

Clear a given task/timer identifier.

Parameters (1)

id

Task/timer identifier.

Return value

True if success, else false.

.wait

task.wait(id: ptr)

Wait until the task/timer is finished.

Parameters (1)

id

Identifier of task/timer.

Return value

None.

PreviousTypesNextGlobal

Last updated 3 years ago

Was this helpful?