dofile (m_simpleTV.MainScriptDir .. "user/TVSources/events.lua")
--input
--m_simpleTV.Control.Reason              Error|EndReached|Stopped|Playing|Sleeping|addressready|Timeout
--m_simpleTV.Control.CurrentAdress       Address from database
--m_simpleTV.Control.RealAdress			 Real Address

--output
--m_simpleTV.Control.CurrentAddress      Address from database
--m_simpleTV.Control.Action              dodefault|repeat|stop

--m_simpleTV.Control.Reason=Sleeping - comp going to sleep, all other fields are undefined   

--m_simpleTV.OSD.ShowMessage('r - ' .. m_simpleTV.Control.Reason .. ',addr= ' .. m_simpleTV.Control.CurrentAdress .. ',radr=' .. m_simpleTV.Control.RealAdress ,255,1)
--debug_in_file('r - ' .. m_simpleTV.Control.Reason .. ', addr= ' .. m_simpleTV.Control.CurrentAdress .. ', radr=' .. m_simpleTV.Control.RealAdress .. 'IsAD=' .. tostring(m_simpleTV.Control.IsAD()) .. '\n')

--if m_simpleTV.Control.Reason == 'Sleeping' then
   --dgdg.sdfgsd=45
--end

--m_simpleTV.Control.EventPlayingInterval=1000
--m_simpleTV.Control.EventTimeOutInterval=1000  



ExecuteFilesByReason('events')


