In the following case, for example, the value of the measure used to remain 10 even after an error. Now it will default to 0 on error.
function Initialize()
i = 0
end
function Update()
if i < 5 then
i = i + 1
return 10
else
i() -- error here, execution stops
return 2
end
end
- Script: The !CommandMeasure argument must now be Lua code. For example:
!CommandMeasure "MeasureLuaScript" "someVar = 'hello'"
!CommandMeasure "MeasureLuaScript" "SomeFunc()"
- Added support for calling Lua functions with !PluginBang
- Removed old (undocumented) implementation for handling mouse actions
- Lua errors now contain the script file name only (instead of full path)
- Removed GetValue() (which has never worked) and deprecated GetStringValue(). The measure value should be returned on Update() now.
- Some related tweaks and cosmetic changes
- GetMeter dynamically detects STRING meters now (no need to use tolua.cast any longer)
- Removed unneeded (and undocumented) functions to exposed to Lua
- Refactored tolua++ generated code
- Fixed: Rainmeter crashes on initialization if Lua is invalid (e.g. syntax error)
- Fixed: Rainmeter crashes on mouse action if Lua file is not initialized
- Fixed: Measure=SCRIPT tries to process mouse actions even if corresponding function does not exist in the Lua file causing log to fill with 'nil value' warnings
- Mainly cosmetic changes to logging of erros in Measure=SCRIPT
----
For instance:
A=2800000000, B=0
- AutoScale=0
AutoScale is disabled. Uses Scale value. (Same as before.)
A="2800000000", B="0"
- AutoScale=1
Scales value by 1024. (Same as before.)
A="2.6 G", B="0.0 "
- AutoScale=2
Scales value by 1000.
A="2.8 G", B="0.0 "
- AutoScale=1k
Scales value by 1024, and uses kilo as the lowest unit.
A="2.6 G", B="0.0 k"
- AutoScale=2k
Scales value by 1000, and uses kilo as the lowest unit.
A="2.8 G", B="0.0 k"
----
- Replace swprintf/wsprintf/wcscpy/wcscat to _snwprintf_s/wcsncpy_s/wcsncat_s.
- Changed printf format parameter strictly for supporting both 32bit and 64bit.
- Fixed an issue that !RainmeterWriteKeyValue doesn't accept %APPDATA%\Rainmeter path.
- Code cleanup.
lua5.1.dll is here so so tolua++.exe can run. It actually generates most of the files in this folder.
The .tolua files are special files that the tolua++ exe uses to create the c++ code.