It is currently March 29th, 2024, 10:56 am

Cycling between sections after set interval in RSS reader skin

Get help with creating, editing & fixing problems with skins
User avatar
chompskyhomp
Posts: 6
Joined: May 19th, 2020, 2:57 am

Re: Cycling between sections after set interval in RSS reader skin

Post by chompskyhomp »

eclectic-tech wrote: May 20th, 2020, 2:11 am Can you post an updated link to your skin package, the one above is no longer valid?
Derp! I can't believe I forgot the link lol. Here it is: https://drive.google.com/file/d/1LtuqXmIfxjDs32VlkAVIL8By2XFX4bxf/view?usp=sharing
eclectic-tech wrote: May 20th, 2020, 3:35 am To change the feed at set time intervals, you could use a Time measure and a Calc measure with IfConditions.

For example, create a new variable called 'NewFeedSeconds' and set it's value to 300 (5 minutes).
Then add 2 measures, a time measure and a calc measure. The calc measure uses modulo math to reset the formula value to zero based on the number of seconds in the Time measure defined by 'NewFeedSeconds'. The If Condition will test if the value is zero and if true, will increase the currentfeed value in a loop from 1 to 6 and command the reader script to show the next feed.

Code: Select all

[Variables]
NewFeedSeconds=300

[MeasureTime]
Measure=Time

[MeasureFeedChange]
Measure=Calc
Formula=MeasureTime%#NewFeedSeconds#
IfCondition=MeasureFeedChange=0
IfTrueAction=[!SetVariable CurrentFeed ((#CurrentFeed#%6)+1)][!CommandMeasure "MeasureReader" "Show(#CurrentFeed#)"]
DynamicVariables=1
Hope this helps get you close to what you want.

Cool thanks, I'm going to mess around with this
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cycling between sections after set interval in RSS reader skin

Post by balala »

Besides eclectic-tech's solution, here is mine as well. It requires to add only one single Loop measure to your code:

Code: Select all

[MeasureLoop]
Measure=Loop
StartValue=1
EndValue=6
UpdateDivider=(5*60)
OnChangeAction=[!CommandMeasure "MeasureReader" "Show([#CURRENTSECTION#])"]
DynamicVariables=1
Note that the above measure changes to the next section after an interval equal with the UpdateDivider value (in this case 5 x 60 = 300 seconds).
User avatar
chompskyhomp
Posts: 6
Joined: May 19th, 2020, 2:57 am

Re: Cycling between sections after set interval in RSS reader skin

Post by chompskyhomp »

balala wrote: May 20th, 2020, 7:45 am Besides eclectic-tech's solution, here is mine as well. It requires to add only one single Loop measure to your code:

Code: Select all

[MeasureLoop]
Measure=Loop
StartValue=1
EndValue=6
UpdateDivider=(5*60)
OnChangeAction=[!CommandMeasure "MeasureReader" "Show([#CURRENTSECTION#])"]
DynamicVariables=1
Note that the above measure changes to the next section after an interval equal with the UpdateDivider value (in this case 5 x 60 = 300 seconds).
I couldn't get the first solution to work, but your solution worked. Thank you very much. I knew it was something with the Loop measure but I couldn't wrap my head around it. Seeing your solution helps me understand it better.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Cycling between sections after set interval in RSS reader skin

Post by balala »

chompskyhomp wrote: May 20th, 2020, 7:55 am I couldn't get the first solution to work, but your solution worked. Thank you very much. I knew it was something with the Loop measure but I couldn't wrap my head around it. Seeing your solution helps me understand it better.
As usually, there are more solutions, mine is just one of them. But I'm glad if it did help you to understand things better.