Copyable Example Code
You can paste this into the code editor; still verify target image, region, color, text, and timing values in your own device flow.
-- Advanced swipe with Touch
-- pointer: finger id (0-9)
local pointer = 0
local startPoint = Point(540, 1200)
local endPoint = Point(540, 600)
local steps = 10
local stepDelayMs = 30
-- Press the finger
Touch.down(startPoint, pointer)
wait(50)
-- Move in small steps for a smooth path
for i = 1, steps do
local x = startPoint:getX() + (endPoint:getX() - startPoint:getX()) * i / steps
local y = startPoint:getY() + (endPoint:getY() - startPoint:getY()) * i / steps
Touch.move(Point(x, y), pointer)
wait(stepDelayMs)
end
-- Lift the finger
Touch.up(pointer)
toast("Touch swipe finished")