This is interesting since it became apparent to me when dealing with both Lua parsing, multiple argument functions, quotes / apostrophes, substitutes and obviously nested variables...
...\@Resources\Script.lua:...\Skin.ini:For simplicity, the script should simply return the first argument that was given to it, but it doesn't. Without the apostrophe it does. I let some alternatives in the comments, which produce either the same (wrong) result, or worse (errors). Didn't test if it also happens for "normal" (i.e. not inline) Lua. I tried to use [[ ]] literal syntax to pass the problematic argument to the Lua function, but naturally, since square brackets mean something else in Rainmeter, it didn't make any difference for the better. Escaping using \" in Lua doesn't make much sense since it's about apostrophes and they exist in the strings from my actual scenario. I guess one could just replace apostrophes with something else and avoid the whole thing or come up with other workarounds specific to the use case, but those won't fix the issue itself.
...\@Resources\Script.lua:
Code:
function Result(text, othertext, numberone, numbertwo) print(text) return textend
Code:
[Variables][Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1BackgroundMode=2SolidColor=0,255,0,255---Measures---[Script]Measure=ScriptScriptFile=#@#Script.luaUpdateDivider=-1[Text]Measure=StringString=It'sRegExpSubstitute=1Substitute="^(.+)$":"[&Script:Result('[&Text]',' not correct like this',2,1)]";Substitute="^(.+)$":'[&Script:Result("[&Text]"," not correct like this",2,1)]'UpdateDivider=-1DynamicVariables=1---Meters---[Result]Meter=StringAntiAlias=1MeasureName=TextText=Result = %1;Text=Result = [&Script:Result('[&Text]',' not correct like this',2,1)]UpdateDivider=-1DynamicVariables=1
Statistics: Posted by Yincognito — Yesterday, 10:42 pm