local pauser = reaper.GetToggleCommandStateEx(0, 1008)
local stoper = reaper.GetToggleCommandStateEx(0, 1016)
local player = reaper.GetToggleCommandStateEx(0, 1007)
local recording = reaper.GetToggleCommandStateEx(0, 1013)

local timer = 0.5 -- Time in seconds
if recording == 1 then 
    reaper.osara_outputMessage("Recording" )
elseif player ==1 then
    reaper.osara_outputMessage("Playing")
elseif pauser == 1 then
    reaper.osara_outputMessage("Pausing")
else
    reaper.osara_outputMessage("Stopping")


end