HelloWorld.toc
Code:
## Interface: 30300
## Title: Hello, World!
## Notes: My first AddOn
HelloWorld.lua
HelloWorld.lua
Code:
local total = 0
local function onUpdate(self,elapsed)
total = total + elapsed
if total >= 1 then
DEFAULT_CHAT_FRAME:AddMessage("ping!")
total = 0
end
end
local f = CreateFrame("frame")
f:SetScript("OnUpdate", onUpdate)
Each second add the message "ping!" to the chat window. Adjust to do what you want it to do and when you want to do it. This is just an example, I'm not actually coding what you want for you.