function num2hex(num)
local hexstr = '0123456789abcdef'
local s = ''
while num > 0 do
local mod = math.fmod(num, 16)
s = string.sub(hexstr, mod+1, mod+1) .. s
num = math.floor(num / 16)
end
if s == '' then s = '0' end
return s
end
function getTBpos()
local input = tb.Position
-- local output = string.format("%02x", input * 256)
local output = num2hex(input)
lb.Caption = 'Trakbar Pos : '..tostring(input)..' = Hex : '..output
end
f.show()
tb.onChange = getTBpos
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum