Code: Select all
local function ShowAutoMessage(TXT,DELAY)
local DELAY = DELAY or 2 --Default Delay
local StartTime = os.clock()
local function Thread(thread,DELAY)
while os.clock() - StartTime < DELAY do sleep(0) end
doKeyPress(VK_ESCAPE)
thread.terminate()
end
createThread(Thread,DELAY)
ShowMessage(TXT)
end
ShowAutoMessage('Close after 2 seconds')
ShowAutoMessage('Close after 5 seconds',5)