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: Gorsel secici / Dialog: Image picker
-- ImagePicker ile kullanicidan gorsel al
local cfg = Setting.builder()
cfg:setTitle("Gorsel Secimi")
cfg:add("hedef1", ImagePicker("hedef1", "Ana hedef gorsel"))
cfg:add("hedef2", ImagePicker("hedef2", "Yedek hedef gorsel"))
cfg:add("eslesme", EditText("85", 1, "Eşleşme oranı (%)"))
Setting.setDialog(cfg:build())
Setting.show()
local hedef1Adi = Setting.get("hedef1") or ""
local hedef2Adi = Setting.get("hedef2") or ""
local eslesme = tonumber(Setting.get("eslesme")) or 85
if hedef1Adi == "" then
toast("Gorsel secilmedi!")
requestStop()
end
local param = FindParam.mScore(eslesme)
param:timeout(5000)
Snap.screenRefresh()
local region = Region()
local match = region:find(Asset.image(hedef1Adi), param)
if not match and hedef2Adi ~= "" then
match = region:find(Asset.image(hedef2Adi), param)
end
if match then
quickTap(match)
toast("Gorsel bulundu ve tiklandi")
end