Here the Skin, but dont grumble to much whit me for the first Project whit Rainmeter
It is currently May 4th, 2024, 6:11 pm
thousands separator
-
- Posts: 40
- Joined: August 8th, 2013, 10:40 pm
Re: thousands separator
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 22631
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: thousands separator
The problem(s) are in one of the other lua scripts you are using, specifically countdown3.lua. That seems to have been written a long time ago, and although it will work, the PROPERTIES table and the use of GetStringValue() as a function to "return" values to the skin are deprecated and will cause warnings. They are actually not in any fatal errors, just not recommended.
If you move the "return" function inside of the Update() function like this:
and just get rid of the GetStringValue() function entirely, that takes care of that.
As to the PROPERTIES table you are using, that is ok, as it isn't actually being used in the original sense of PROPERTIES in the Rainmeter/Lua implementation, but can and should just be moved inside the Initialize() function.
I think you might want to rename it from PROPERTIES to something else as well, as you might still get the warning in the log if you use the name "PROPERTIES" as the name of a table anywhere in the Lua.
If you move the "return" function inside of the Update() function like this:
Code: Select all
function Update()
return GetTimeLeft()
end
As to the PROPERTIES table you are using, that is ok, as it isn't actually being used in the original sense of PROPERTIES in the Rainmeter/Lua implementation, but can and should just be moved inside the Initialize() function.
Code: Select all
function Initialize()
PROPERTIES = {year=0, month=0, day=0, hour=0, min=0, sec=0, fintext=""}
RELEASEDATE = {}
setmetatable(RELEASEDATE, getmetatable(PROPERTIES))
for k,v in pairs(PROPERTIES) do
if k ~= fintext then
RELEASEDATE[k] = v
end
end
RELEASEDATE.isdst = true
RELEASETEXT = PROPERTIES.fintext or ""
end
-
- Posts: 218
- Joined: August 5th, 2014, 5:04 pm
- Location: Luleå, Sweden
Re: thousands separator
This is great! this morning I've been changing my skins so it got this thousands seperator on WebParsings.
However, now it comes to the skins where I made calculations with other parsing and with numbers, using the calc measure.
This is how the code part looks for example:
The output of this all makes a comma with more numbers than before.
I wanna have whole numbers only. Tried look for some option in calc measure ( http://docs.rainmeter.net/manual/measures/calc ) to just not make decimals but can't see any.
Must been with this Lua code that it made exact calculation. If it's possible to delete the decimals totally? I wont need it for any of the skins I'm using in the current skin package I'm working with
However, now it comes to the skins where I made calculations with other parsing and with numbers, using the calc measure.
This is how the code part looks for example:
Code: Select all
[MeasureHoursLeft]
Measure=Calc
Formula=(MeasurePointsLeft/MeasurePPH)
DynamicVariables=1
OnUpdateAction=[!CommandMeasure MeasureFormatNumber "FormatNumber('HoursLeft', '[MeasureHoursLeft]', '#Separator#', '#Decimal#')"]
I wanna have whole numbers only. Tried look for some option in calc measure ( http://docs.rainmeter.net/manual/measures/calc ) to just not make decimals but can't see any.
Must been with this Lua code that it made exact calculation. If it's possible to delete the decimals totally? I wont need it for any of the skins I'm using in the current skin package I'm working with