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.
-- Dialog: Metin girisi / Dialog: Text input
-- Setting.builder() ile kullanicidan parametre al
local cfg = Setting.builder()
cfg:setTitle("Makro Ayarlari")
cfg:add("gecikme", EditText("500", 1, "Gecikme (ms)"))
cfg:add("tekrar", EditText("10", 1, "Tekrar sayısı"))
cfg:add("hedef", EditText("buton_ok", 1, "Hedef ismi"))
Setting.setDialog(cfg:build())
Setting.show()
-- Girilen degerleri oku
local gecikme = tonumber(Setting.get("gecikme")) or 500
local tekrar = tonumber(Setting.get("tekrar")) or 10
local hedef = Setting.get("hedef") or "buton_ok"
toast("Gecikme: " .. gecikme .. "ms, Tekrar: " .. tekrar)
-- Degerleri kullan
local i = 1
while i <= tekrar do
Snap.screenRefresh()
local r = Region()
local m = r:find(Asset.image(hedef))
if m then quickTap(m) end
wait(gecikme)
i = i + 1
end