Ready-to-use Code ExampleHud

HUD Panel Display

Creates a floating info box on screen. Hud() sets position, size and click capability; text and style methods are called on the Hud object it returns. Ideal for showing macro status, keeping counters, or informing the user.

Completion, parameter hints and type checking. Installation instructions and downloads are hosted on GitHub.

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.

-- HUD overlay
-- Hud(x, y, w, h, clickable)

local hud = Hud(10, 10, 300, 60, false)
hud:setText("Macro running...")
hud:setTextColor("#FFFFFF")
hud:setBackgroundColor("#CC000000")
hud:setTextSize(16)
hud:setRound(12)
hud:setPadding(10)
hud:show()

-- Use it as a counter
for step = 1, 10 do
  hud:setText("Step: " .. step .. " / 10")
  wait(1000)
end

hud:setText("Done!")
wait(2000)
hud:dispose()

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.