Jkon wrote:Downloaded this last night and am using it to view rainmeters log file,works great. I was wondering if there is any way to point tooltiptext to the string value the lua file is sending to each meter.Perhaps in some future version of rainmeter,tooltiptext could be coded to automatically show the string value sent to the meter from a lua file (or some built in var like Tooltiptext=#LuaValue#).As i have no idea how lua and rainmeter interact I apologise if this is a daft idea.
It's not daft at all, but not something that would be simple to do (I suspect) in the current code. The problem is that there is no "return value" from a meter, only from measures. So within Rainmeter itself, there is currently no way to in effect say ToolTipText=[Meter1], only ToolTipText=[Measure1]. In other words, Rainmeter today can't ask "Hey Meter1, what is your value right now?".
However, you can come at this a different way today.
First, you need to know one rule:
If you use SetText() to force the value of a meter from Lua, then you can't use DynamicVariables on that meter.
So, if you use SetText() to set a meter with a line from a log file, like in my skin, then you can't do the obvious thing with the ToolTipText, which would be:
Then have the Lua set the output of [Meter1] to the line from the log file using SetText(), and set the value of the variable Meter1TipText using a !SetVariable bang from Lua. It won't work
as ToolTipText then can't be dynamic and will just stay as "N/A".
However, you could do this:
and instead of using SetText() in the Lua, just use !SetVariable to set both of those above to what you want. Since [Meter1] is set to be dynamic, and SetText() is not used, the new values will display just fine.