Ready-to-use Code ExampleTouchPoint

Advanced Swipe with Touch API

Step-by-step controlled swipe using Touch.down/move/up. Suitable for joystick control, precise dragging, and multi-finger gestures. The pointer parameter enables multi-touch support.

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.

-- Touch API ile gelismis kaydırma / Advanced Touch swipe
-- Parametreler: pointer = parmak indeksi (0-9)

local pointer = 0
local baslangic = Point(540, 1200)
local bitis = Point(540, 600)
local adimSayisi = 10
local adimGecikme = 30

-- Parmagi bas
Touch.down(baslangic, pointer)
wait(50)

-- Adım adım kaydır (yumuşak hareket)
local i = 1
while i <= adimSayisi do
  local oranX = baslangic:getX() + (bitis:getX() - baslangic:getX()) * i / adimSayisi
  local oranY = baslangic:getY() + (bitis:getY() - baslangic:getY()) * i / adimSayisi
  Touch.move(Point(oranX, oranY), pointer)
  wait(adimGecikme)
  i = i + 1
end

-- Parmagi kaldir
Touch.up(pointer)
toast("Touch kaydırma tamamlandı")

Implementation and Adaptation Notes

  • Before running, replace sample values such as image names, text, colors, coordinates, and file paths with your own macro values.
  • For examples that use Region or coordinates, retest the target area on different resolutions and DPI values.
  • Tune mScore, timeout, and scan rate in a test macro first, then move the verified values into the production macro.