Of course. I've been doing the same in my scripts as well in the past, getting table elements through functions and all, it just seemed appropriate to mention it for a better understanding by other potential readers, or, if by any chance it was the case (which is not, as you just mentioned) to allow such references when retrieving a variable.The underlying issue is that the "glue" functionality that binds Rainmeter and Lua together just doesn't support any direct reference to any table indexes through the interface. Not as a function parameter, not as a variable retrieval, just not at all.
As mentioned, the only way is to pass the name of the table and the index desired as separate parameters, and using a function() in Lua, get and return the desired value.
Indeed. It makes some sense judging by how Rainmeter operates otherwise, since nearly all, if not all measures in a skin must return a single value, while a table is by definition a set of (multiple) values encapsulated in the object you mentioned. Same for a return somevalue, anothervalue from a Lua function.Means that the variable "t" is actually a table object in Lua. That can't be addressed directly in Rainmeter.
Statistics: Posted by Yincognito — Today, 1:22 am — Replies 7 — Views 95