Thank you Crest, it was my bad actually. I forgot the last "end" lol, I did try completing the if statements though .
So, for those who want to try this method:
#@#Script.lua
Code:
function conditional(cond, true_str, false_str) if SKIN:ParseFormula(SKIN:ReplaceVariables(cond)) == 1 then return true_str else return false_str endend
Code:
[Rainmeter]Update=1000DynamicWindowSize=1AccurateText=1[Variables]Condition=(10 + 8)*2 > 35True=[#Condition] is TrueTrueColor=0,255,0False=[#Condition] is FalseFalseColor=255,0,0[Script]Measure=ScriptScriptFile=#@#Script.luaUpdateDivider=-1DynamicVariables=1[Condition]Measure=StringString=[&Script:conditional('([#Condition])','[#True]','[#False]')]UpdateDivider=-1DynamicVariables=1[MeterResult]Meter=StringFontFace=ConsolasFontColor=[&Script:conditional('([#Condition])','[#TrueColor]','[#FalseColor]')]SolidColor=9,25,25,255Padding=5,5,5,5FontSize=18AntiAlias=1MeasureName=ConditionText="Condition result: %1"DynamicVariables=1
Statistics: Posted by RicardoTM — Today, 7:24 am — Replies 8 — Views 342