Ready-to-use Code ExampleSettingDialogCheckbox

Dialog: Checkbox

Presents on/off options with Checkbox components. Users can independently toggle multiple features. Values are read as "true" or "false".

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: Onay kutusu / Dialog: Checkbox
-- Checkbox ile açık/kapalı seçenekler

local cfg = Setting.builder()
cfg:setTitle("Ozellik Secimi")

cfg:add("sesli", Checkbox(true, "Sesli bildirim"))
cfg:add("log", Checkbox(false, "Log dosyasina yaz"))
cfg:add("hud", Checkbox(true, "HUD goster"))
cfg:add("hizli", Checkbox(false, "Hizli mod"))

Setting.setDialog(cfg:build())
Setting.show()

-- Secenekleri oku
local sesliAktif = Setting.get("sesli") == "true"
local logAktif = Setting.get("log") == "true"
local hudAktif = Setting.get("hud") == "true"
local hizliMod = Setting.get("hizli") == "true"

if hudAktif then
  local hud = Hud(10, 10, 250, 40, false)
  hud:setText("Makro aktif")
  hud:show()
end

if sesliAktif then
  System.vibrate(200)
end

toast("Log: " .. tostring(logAktif) .. ", Hizli: " .. tostring(hizliMod))

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.