Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 750

Lua Scripting • LUA GetOption() - How to preserve variable references?

$
0
0
https://docs.rainmeter.net/manual/lua-scripting/#GetOption
There slightly is a tool that would have helped with this, GetOption used to have an undocumented function that was added recently to the page.
To quote it directly, "If the optional boolean parameter bReplaceMeasures is provided, when set to false it will not replace any section variables before retrieving that option."
That being said, it will not work here, since normal/new/nested variables when read are already replaced in memory and RM has no idea what they were before, you could technically just write

Code:

[MyVariable]Measure=StringString=255,0,5
(or a Script measure since you have infinite Option=Value) and bReplaceMeasure just works, but you may be losing some benefits from normal variables (I can't think of any right now though).

Statistics: Posted by Jeff — Today, 11:47 am — Replies 18 — Views 2478



Viewing all articles
Browse latest Browse all 750

Trending Articles