Perform a swipe gesture from a flat list of SwipePoint values. Each list creates one multi-point path for one finger.
Syntax
swipe(points, *, parallel=False)Parameters
| Name | Description |
|---|---|
pointslist[SwipePoint] | Flat path for one finger. Requires at least 2 points. Required · Positional or named No default |
parallelBoolean | When True, returns a numeric touch id. In collect mode the swipe waits for Touch.send(); otherwise it queues immediately. Use Touch.cancel(id) or Touch.cancel() to cancel queued/active touches. Optional · Keyword only Default: False |
Returns
Number | None — Returns a numeric id only when parallel=True; otherwise None.Example
path = [
SwipePoint(Point(500, 1500), speed="FAST"),
SwipePoint((560, 980), speed="NORMAL", humanized=True),
SwipePoint(Point(500, 500))
]
swipe(path)
Touch.collect()
left = swipe(path, parallel=True)
right = swipe([
SwipePoint(Point(780, 1500), speed="FAST"),
SwipePoint(Point(780, 500))
], parallel=True)
Touch.send()
Touch.wait()