Wait block
The touch "wait" block pauses the macro for a number of milliseconds before the next step.
Signature
wait(ms: number): void
Parameters
| Parameter | Type | Description |
|---|---|---|
| ms | number | How long to pause, in milliseconds |
Returns
void
Description
The block generates wait(ms), a shortcut for Utils:sleep(ms). Use it between touch
events when an app needs a moment to react, or when a gesture should hold still.
Example
Touch:init()
Touch:down(500, 900)
wait(150) -- hold before moving
Touch:move(500, 400)
Touch:up()
Touch:exit()