Here is an example of what im trying to do:
.ini:
PS:started doing stuff with rainmeter tday, so pls be kind
Code: Select all
function Initialize()
measureOSVersion=SKIN:GetMeasure('MeasureOSVersion')
end
function Update()
osv=measureOSVersion:GetStringValue()
strSplit=split(osv)
SKIN:Bang('!SetOption', 'Text1', 'Text', strSplit[1])
SKIN:Bang('!SetOption', 'Text2', 'Text', strSplit[2])
end
function split(str)
local tbl = {}
for w in str:gmatch("%w+") do
table.insert(tbl,w)
end
return tbl
end
Good deal. I do think you might have been seeing something incorrectly though,Proxy wrote:ty very much, great answer.
Odd thing was that "[MeasureOSVersion]" was fetching the plugins return too, but splitting was impossible.
This is way more convenient.
solved
*facepalm* just noticed that i was using the wrong (and partly working) lua file. Thats why i thought "[MeasureOSVersion]" was giving me real values.jsmorley wrote: osv="[MeasureOSVersion]"
Will just return the literal string "[MeasureOSVersion]", not any value from the plugin.
Not clear exactly what you mean.Proxy wrote:
One quick other question: How do i pass along Text variables of String Meters to a lua function?