Using simple lua if statements corrected by SilverAzide
Using lua string compilation (loadstring) by nek
Using ParseFormula by Crest
Any other contribution is welcome.
Statistics: Posted by RicardoTM — Yesterday, 9:36 pm — Replies 8 — Views 326
Code:
function conditional(cond, true_str, false_str) if cond then return true_str else return false_str endend
Code:
print(conditional(10 > 18, 'Yes', 'No'))
Code:
function conditional(cond, true_str, false_str)if cond then return true_str else return false_str endend
Code:
[Rainmeter]Update=1000DynamicWindowSize=1AccurateText=1[Script]Measure=ScriptScriptFile=#@#Script.luaUpdateDivider=-1DynamicVariables=1[Condition]Measure=StringString=[&Script:conditional(10 > 18,'Yes','No')]UpdateDivider=-1DynamicVariables=1[MeterResult]Meter=StringFontFace=ConsolasFontColor=225,255,255,255SolidColor=9,25,25,255Padding=5,5,5,5FontSize=18AntiAlias=1MeasureName=ConditionText="Condition result: %1"DynamicVariables=1
Statistics: Posted by RicardoTM — Yesterday, 9:36 pm — Replies 8 — Views 326