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.
-- Gunluk tiklama sayaci / Daily click counter
-- KV.increment ile atomik artirma, KV.has ile varlik kontrolu
local today = DateTime():format("YYYY-MM-DD")
local key = "tiklama_" .. today
-- Ilk calistirmada baslat
if not KV.has(key) then
toast("Yeni gun basliyor: " .. today)
end
-- Atomik artir, yeni toplami al
local total = KV.increment(key, 1)
toast("Bugunki tiklama: " .. total)
-- Belirli esikte uyari
if total == 100 then
System.vibrate(200)
System.noti("100 tiklamaya ulasildi", "Bugun: " .. today)
end
-- Tum gun sayaclarini listele
if KV.size() > 7 then
-- 7 gunden fazla gecmis varsa eski olanlari temizle
local allKeys = KV.keys()
toast("Toplam gun sayisi: " .. #allKeys)
end