font_size = 20
font_name = "Arial"
window_w = 150
window_h = 40
marge = 20
marge2 = 100
line_height = 10
function init(window_w, window_h)
gfx.init("" , window_w, window_h)
gfx.setfont(1, font_name, font_size, 'b')
gfx.a = 1
gfx.r = 1
gfx.g = 1
gfx.b = 1
end
function run()
time = os.time()-init
line = 0
gfx.x = marge
gfx_a = 1
gfx.r = 255/255
gfx.g = 255/255
gfx.b = 16/255
--[[
line = line + 1
gfx.x = marge
gfx.y = line * line_height
gfx.printf("Hidden env: ")
line = line + 1
gfx.x = marge
gfx.y = line * line_height
gfx.printf("Hidden env: ")
==]]
line = 0
gfx.r = 255/255
gfx.g = 255/255
gfx.b = 255/255
line = line + 1
gfx.x = marge + marge2
gfx.y = line * line_height
if time < 3600 then
time_form = '0 hrs '..tostring(math.floor(time/60))..' min '..tostring(math.fmod(time,60))..' sec'
else
time_form = tostring(math.floor(time/3600))..' hrs '..tostring(math.fmod(time,60))..' min '..tostring(math.fmod(time,60))..' sec'
end
gfx.printf(time_form)
gfx.update()
if gfx.getchar() >= 0 then reaper.defer(run) end
end
init(window_w, window_h)
init = os.time()
ini_path = reaper.GetResourcePath()
run()