Do you mean convert "hours into integers" or something like that?
If this is the case, I made a function in almost pure lua code for a few weeks.
Here you go:
function HoursToInteger(nH)
t = {};
if (#nH >= 1) then
n = 0;
for k, v in string.gmatch(nH, "*-(%d+)") do
n = n + 1;
t[n] = k;
end
if (t ~= nil and table.maxn(t) == 3) then
nHours = t[1] * 60;
nMins = t[2] * 60 / 60;
if (tonumber(t[3]) > 30) then
nSecs = Math.Round(t[3] * 60 / 3600, 0);
else
nSecs = 0;
end
elseif (t ~= nil and table.maxn(t) == 2) then
nHours = t[1] * 60;
nMins = t[2] * 60 / 60;
nSecs = 0;
elseif (t ~= nil and table.maxn(t) == 1) then
nHours = t[1] * 60;
nMins = 0;
nSecs = 0;
else
nHours = 0;
nMins = 0;
nSecs = 0;
end
return (nHours + nMins + nSecs);
end
end
How do it works?
Put this function in the Global Functions code area, to call it just put, for example, in a button:
Input.SetText("Input2", HoursToInteger(Input.GetText("Input1")));
Of course you'll need two inputs, "input and output".
If you know something about lua then you'll know this code can be improved a lot.
Did this helps to you? Then we wait for your examples. Otherwise...
Regards.
By the way...
I wait for your feedback.