Hi
I'm a beginer in LUA progaming and I need some help with OSD
I' tryng to edit a OSD example and I don't know how to implement the TimeOut function.
I read in this forum something about "osd.Classes.Base" but I don't know how to use it.

The script that I try to edit is:

function OnPaint()
print("Paint")
myosd:CopyBufferToScreen()
end

if myosd then
myosdestroy()
end

local width = 500

myosd = osd.CreateOSD()


myosd:OnEvent(osd.OnPaint, OnPaint);
local x = (500)
local y = (500)
myosd:Position(x,y)

myosd:WorkOnBuffer(true)
myosd:Size(100,100)
local bfill2 = osd.CreateLinearGradientBrush(0,0,100,100,osd.Make ARGB(255,0,0,0),osd.MakeARGB(255,255,0,0))
myosd:FillRectangle(0,0,100,100,bfill2);
myosd:Size(width,100)
local bfill = osd.CreateLinearGradientBrush(0,0,width,100,osd.Ma keARGB(255,123,54,43),osd.MakeARGB(255,11,255,32))
myosd:FillRectangle(100,0,width,100,bfill);
myosd:SetTransparency(nil,200)
myosd:CopyBufferToScreen()
local btext = osd.CreateSolidBrush(osd.MakeARGB(200,255,255,255) )
myosdrawString('Test OSD for Testing Purposes','arial',25,10,10,btext)

local bpen = osd.CreatePen(osd.CreateSolidBrush(osd.MakeARGB(25 5,0,0,255)),1)
collectgarbage()
local x,y, w,h = myosd:GetStringBoundingBox('Test OSD for Testing Purposes', 'arial', 25)
myosdrawRectangle(10+x,10+y,w,h,bpen)


myosd:CopyBufferToScreen()
myosd:Topmost(true)
myosd:Show()