Indeed, you're very close, but you're missing a couple of small things:hello, I believe I am very close, but missing something small... what I want is every X seconds/minutes display random RSS feed (StringIndex 1 to 10)
thx
- your current Formula starts from 1, but subsequent restarts will be from 0 given its form (e.g. ((9 + 1 ) %10 ) = 0 and so on), see the adjustment below
- your 1st OnUpdateAction additionally needs this to trigger [Feed], while your 2nd OnUpdateAction should be this for a WebParser parent measure since the update time in such a case is not the same with the time the online retrieval is complete
- your StringIndex values need a little adjustment, because currently they must increase by 2 (i.e. the title and the link, aka FeedEntries) and not just by 1
- although in practice they're sometimes unnecessary, it's better to enclose paths or links between quotes, e.g. in your LeftMouseUpAction
- as always, enabling dynamic variables via DynamicVariables=1 in key places is an easy to overlook detail that can make your skin work
So, given the above, your code should be something like (compare the differences):
Code:
[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1; --- [RndNo]Measure=CalcFormula=(RndNo % 10 + 1)UpdateDivider=60OnUpdateAction=[!SetVariable FeedNo "[RndNo]"][!CommandMeasure Feed "Update"]DynamicVariables=1; --- [Variables]itm=.*<item.*>.*<title>(.*)</title>.*<link>(.*)</link>.*FeedNo=1FeedEntries=2; --- [Feed]Measure=WebParserUrl="https://news.google.com/rss"RegExp="(?siU)#itm##itm##itm##itm##itm##itm##itm##itm##itm##itm#"FinishAction=[!UpdateMeter *][!Redraw]; --- RSS1 [MeasureT]Measure=WebParserUrl=[Feed]StringIndex=((#FeedNo# - 1) * #FeedEntries# + 1)DynamicVariables=1[MeasureL]Measure=WebParserURL=[Feed]StringIndex=((#FeedNo# - 1) * #FeedEntries# + 2)DynamicVariables=1[Meter]Meter=STRINGMeasureName=MeasureTX=0Y=0W=500SolidColor=0,0,0,1FontColor=255, 255, 255FontSize=10ClipString=1DynamicVariables=1AntiAlias=1LeftMouseUpAction=["[MeasureL]"]Text="_%1"; ---
Statistics: Posted by Yincognito — Yesterday, 4:29 pm