This is a tricky little challenge. The problem is that both "child" measures and the Download=1 option ignore any "Substitute" values.
So I don't think there is a way to get the images from that site in native Rainmeter.
However, we can do it with a really simple Lua script, and a somewhat less simple (but not too bad) skin.
Skin:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
[MeasureWebsite]
Measure=Plugin
Plugin=WebParser.dll
UpdateRate=1800
Url=http://im-to-poor-to-buy-an-domain.my.gp/
RegExp="(?siU)^(.*)$"
StringIndex=1
FinishAction=[!DisableMeasureGroup LocalFile][!EnableMeasure MeasureLuaScript]
[MeasureLuaScript]
Measure=Script
ScriptFile=#CURRENTPATH#XTest.lua
Disabled=1
[MeasureFile]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=file://#CURRENTPATH#Output.txt
RegExp="(?siU)\(\{"0":"(.*)","1":"(.*)","2":"(.*)","3":"(.*)","4":"(.*)","5":"(.*)","6":"(.*)","7":"(.*)","8":"(.*)""
Disabled=1
[MeasureImage1]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=[MeasureFile]
StringIndex=1
Download=1
Disabled=1
[MeasureImage2]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=[MeasureFile]
StringIndex=2
Download=1
Disabled=1
[MeasureImage3]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=[MeasureFile]
StringIndex=3
Download=1
Disabled=1
[MeasureImage4]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=[MeasureFile]
StringIndex=4
Download=1
Disabled=1
[MeasureImage5]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=[MeasureFile]
StringIndex=5
Download=1
Disabled=1
[MeasureImage6]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=[MeasureFile]
StringIndex=6
Download=1
Disabled=1
[MeasureImage7]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=[MeasureFile]
StringIndex=7
Download=1
Disabled=1
[MeasureImage8]
Measure=Plugin
Plugin=WebParser.dll
Group=LocalFile
Url=[MeasureFile]
StringIndex=8
Download=1
Disabled=1
[MeterImage1]
Meter=Image
MeasureName=MeasureImage1
[MeterImage2]
Meter=Image
X=5R
MeasureName=MeasureImage2
[MeterImage3]
Meter=Image
X=5R
MeasureName=MeasureImage3
[MeterImage4]
Meter=Image
X=5R
MeasureName=MeasureImage4
[MeterImage5]
Meter=Image
X=5R
MeasureName=MeasureImage5
[MeterImage6]
Meter=Image
X=5R
MeasureName=MeasureImage6
[MeterImage7]
Meter=Image
X=5R
MeasureName=MeasureImage7
[MeterImage8]
Meter=Image
X=5R
MeasureName=MeasureImage8
Lua:
Code: Select all
function Initialize()
msSite = SKIN:GetMeasure('MeasureWebsite')
msPath = SKIN:GetVariable('CURRENTPATH')
end -->Initialize
function Update()
sInput = msSite:GetStringValue()
sOutput = string.gsub(sInput, '\\', '')
hFile = io.open(msPath..'Output.txt', 'w')
hFile:write(sOutput)
hFile:close()
SKIN:Bang('!EnableMeasureGroup', 'LocalFile')
SKIN:Bang('!DisableMeasure', 'MeasureLuaScript')
end -->Update
Try this:
XTest_.rmskin
8-6-2012 1-48-19 PM.jpg
What we are doing is getting the entire text of the web site in the main WebParser measure.
Then with FinishAction we fire up the Lua script. The Lua parses the result and removes
the "\" characters, then writes it to a local file. The Lua then "enables" some patiently waiting measures in the skin.
Those measures then use that local file with a normal WebParser "parent / child" approach to download the images, and we display them in meters.
Let me know if you have any questions, this might take just a couple of minutes to wrap your head around.
You do not have the required permissions to view the files attached to this post.