I just noticed that the nopath.lua script (which essentially strips the file path from the front of an image so that only the name of the photo itself i.e. HolidaySnap1.jpg not mydocs/camera/2012/HolidaySnap.jpg) appears in my slide show skin is not working. This is the log error:
Capture.PNG
and this is the lua file which is beyond my ability to fix:
PROPERTIES =
{
}
function Initialize()
MeterToUpdate = tolua.cast(SKIN:GetMeter("MeterImageName"), "CMeterString")
MeasureImageName = SKIN:GetMeasure("Random")
end -- function Initialize
function Update()
FullImageName = MeasureImageName:GetStringValue()
Path, ImageName, Extension = string.match(FullImageName, "(.-)([^\\]-([^%.]+))$")
MeterToUpdate:SetText(ImageName)
end -- function Update
function GetStringValue()
return ImageName
end -- function GetStringValue
Can someone have a look and see if this is a simple fix, i presume there has been another change to lua. TIA.
You do not have the required permissions to view the files attached to this post.
"Regrettably your planet is one of those scheduled for demolition"
Mike
Are you sure that the [Random] measure exists in your skin? That error usually just means that Lua can't find the measure.
There were also some outdated bits in your script, as you expected. I don't think they're the cause of your problem, but for good form, I've removed them anyway:
function Initialize()
MeasureImageName = SKIN:GetMeasure('Random')
end
function Update()
local FullImageName = MeasureImageName:GetStringValue()
local Path, ImageName, Extension = string.match(FullImageName, '(.-)([^\\]-([^%.]+))$')
SKIN:Bang('!SetOption', 'MeterImageName', 'Text', ImageName)
return ImageName
end
[Random] is the QuotePlugin measure which is there.
However, the tidied script gives Script: NoPath.lua:2: '(' expected near 'Initialize' which after comparing the old one lead me to this {}function Initialize() and the file name is now appearing again. Thank you Sir.
"Regrettably your planet is one of those scheduled for demolition"
Mike
We work pretty hard to ensure backwards compatibility when we make changes to any part of Rainmeter... If we were really forced to make a change that broke existing skins, it would be in two foot high capital letters in the release notes.