Jkon wrote:Had to add another end function but it's working.
PROPERTIES =
{
}
function Initialize()
tImages = {}
for i = 1, 2 do
tImages = SKIN:GetMeter("Image"..i)
end
end -- function Initialize
function Update()
for i = 1, 2 do
Height = tImages:GetH()
SKIN:Bang("!SetVariable H"..i.." "..Height)
end
return tostring(Height)
end -- function Update
Also had to change the return to (Height).Not sure what the purpose of return is and what should really be in there.
Looks good. You don't really need a "return" here, you are not using the value of the script measure anywhere in the skin with "MeasureName=ScriptMeasure" on a meter or "Formula=ScriptMeasure" in a Calc. However, using return even in that case can be useful so you can glance at "About" in Rainmeter and see that things are working. You can use it for some quick debugging, by "returning" some variable you are interested in. Even just saying
return "Hey, it works!"
Can be useful, as if the script crashes, you won't get that in "About", you will get a blank.
Understood.Thanks for your help again.Now I need to try to adapt the script so it will ignore a meter if it does not exist as because of the nature of the skin each image and its border are in separate includes and not all includes need be included in the ini at one time.This should be interesting,wish me luck.
Jkon wrote:Understood.Thanks for your help again.Now I need to try to adapt the script so it will ignore a meter if it does not exist as because of the nature of the skin each image and its border are in separate includes and not all includes need be included in the ini at one time.This should be interesting,wish me luck.
Well, you can do a "GetMeter" and check for a "nil" return from the function.