1) The manual (I included a typo, just to spice things up...):
2) What actually happens...The syntax of an inline Lua call to a function() is:
[&ScriptMeasureName:LuaFunctionName(numberParameter, 'stringParameter', ...)]
Examples:
[&MeasureMyScript:GetCharaceterInString('Rainmeter', 5)]
[&MeasureMyScript:ConvertTemperature([&MeasureCurrentTemp], 'C')]
The types of parameters that can be passed to the Lua function() are:
Number Any number literal, formula or variable that resolves to a number.
String Any 'string' literal, or variable that resolves to a string, enclosed in 'single quotes'.
Boolean One of either true or false.
#@#Script.lua:
Code: Select all
function Result(number)
return number
end
Code: Select all
[Variables]
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
BackgroundMode=2
SolidColor=47,47,47,255
---Measures---
[MeasureScript]
Measure=Script
ScriptFile=#@#Script.lua
UpdateDivider=-1
---Meters---
[MeterTest]
Meter=String
FontFace=Consolas
FontColor=255,255,255,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
Text="Script = [&MeasureScript:Result((7+3))]"
UpdateDivider=-1
DynamicVariables=1
I know I can call SKIN:ParseFormula() from within Lua if I pass the operation as a string and all that, but I thought the formula would be parsed by Rainmeter before sending it to Lua, similar to how Rainmeter variables are parsed before they get to Lua. Was I mistaken?

P.S. Feel free to move this thread appropriately if this is a bug.